Sha256: 2db3a931bb5152437fc871796b5315f861662597b53f8aa61915447b7057ce0f
Contents?: true
Size: 721 Bytes
Versions: 15
Compression:
Stored size: 721 Bytes
Contents
module GmapCoordinatesPicker module FormBuilder def self.included(base) base.send(:include, GmapCoordinatesPicker::ViewHelper) base.send(:include, GmapCoordinatesPicker::FormBuilder::ClassMethods) end module ClassMethods # Example: # <% form_for :shop, :url => shops_path do |form| %> # ... # <%= form.gmap_coordinate_picker :gmap_conf => {:lat_column => 'latitude', :lng_column => 'longitude' }, :default_coordinates => some_default_coordinates %> # <% end %> # def gmap_coordinate_picker(options = {}) options.update :object => @object_name render_gmap_coordinate_picker(objectify_options(options)) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems