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

Version Path
gmap_coordinates_picker-0.1.2 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.13 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.12 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.11 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.10 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.9 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.8 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.7 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.1.0 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.6 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.5 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.4 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.3 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.2 lib/gmap_coordinates_picker/form_builder.rb
gmap_coordinates_picker-0.0.1 lib/gmap_coordinates_picker/form_builder.rb