Module: ApplicationHelper

Defined in:
lib/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#gmaps(options, enable_css = true, enable_js = true) ⇒ Object



11
12
13
# File 'lib/application_helper.rb', line 11

def gmaps(options, enable_css = true, enable_js = true )
  render :partial => 'gmaps4rails/gmaps4rails', :locals => { :options => options, :enable_css => enable_css, :enable_js => enable_js }
end

#gmaps4rails(builder, enable_css = true, enable_js = true) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/application_helper.rb', line 3

def gmaps4rails(builder, enable_css = true, enable_js = true )
  options = {
    "map_options" => { "auto_adjust" => true},
    "markers"     => { "data" => builder }
  }
  render :partial => 'gmaps4rails/gmaps4rails', :locals => { :options => options, :enable_css => enable_css, :enable_js => enable_js }
end