Module: YMaps

Defined in:
lib/ymaps.rb,
lib/ymaps/version.rb,
lib/ymaps/action_view.rb,
lib/ymaps/action_view/html_helper.rb,
lib/ymaps/action_view/ymapsml_helper.rb

Defined Under Namespace

Modules: ActionView Classes: Railtie

Constant Summary collapse

VERSION =
'0.0.9'

Class Method Summary collapse

Class Method Details

.geocode(query) ⇒ Object


9
10
11
12
# File 'lib/ymaps.rb', line 9

def self.geocode(query)
  require 'geokit/geocoders/yandex_geocoder'
  ::Geokit::Geocoders::YandexGeocoder.geocode(query)
end

.setup!Object


14
15
16
17
# File 'lib/ymaps.rb', line 14

def self.setup!
  ::ActionView::Base.send(:include, YMaps::ActionView::Helpers)
  ::Mime::Type.register_alias 'application/xml', :ymapsml
end