Class: ActiveAdmin::Views::GoogleMapProxy

Inherits:
LatlngProxy
  • Object
show all
Defined in:
lib/activeadmin/views/google_map_proxy.rb

Instance Method Summary collapse

Methods inherited from LatlngProxy

#key, #loading_map_code, #script_html, #to_s

Instance Method Details

#build(_, *args, &_block) ⇒ Object



4
5
6
7
8
9
# File 'lib/activeadmin/views/google_map_proxy.rb', line 4

def build(_, *args, &_block)
  super _, *args, &_block
  @api_key_name = 'key'
  @template_name = 'google.html.erb'
  @script_html = "<script src=\"https://maps.googleapis.com/maps/api/js?language=%s%s&libraries=places&callback=googleMapObject.init\" async defer></script>"
end