From f299412d1bdce4a778d191a9b33c2416aefe6de0 Mon Sep 17 00:00:00 2001 From: Teo Date: Fri, 21 Mar 2014 22:16:43 +0100 Subject: [PATCH 1/2] update doc to understand googl maps address --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 96f561b..2263bbe 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,39 @@ Multiple options: end ``` +### Google Map Address + +A simple way to find lat, lon in google map. Basic usage: + +Requires the following in config/initializers/active_admin.rb + +```ruby + ActiveAdmin.application.register_javascript "https://maps.googleapis.com/maps/api/js?sensor=false" +``` + +Add [address] (or any other name), latitude end longitude string column to your model via migration + +```ruby + def change + add_column :apartments, :address, :string + add_column :apartments, :latitude, :string + add_column :apartments, :longitude, :string + end +``` + +Configure your active admin model file + +```ruby + /app/admin/apartement.rb + + form do |f| + f.inputs :logistic do + f.input :address, as: :map_address + end + end +``` + + ## Copyright Copyright (c) 2012 Stefano Verna, Cantiere Creativo From 3a0f0c4c0e63caf3fc68d4a6b8b1bfdc8e9f76f0 Mon Sep 17 00:00:00 2001 From: Teo Date: Fri, 21 Mar 2014 22:19:39 +0100 Subject: [PATCH 2/2] update doc to understand google maps address --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2263bbe..6fcfdac 100644 --- a/README.md +++ b/README.md @@ -118,15 +118,15 @@ Multiple options: ### Google Map Address -A simple way to find lat, lon in google map. Basic usage: +A simple way to find latitude and longitude values trhough a google map. Basic usage: Requires the following in config/initializers/active_admin.rb ```ruby - ActiveAdmin.application.register_javascript "https://maps.googleapis.com/maps/api/js?sensor=false" + ActiveAdmin.application.register_javascript "https://maps.googleapis.com/maps/api/js?sensor=false" ``` -Add [address] (or any other name), latitude end longitude string column to your model via migration +Add address (or any other name), latitude end longitude string column to your model via migration ```ruby def change @@ -148,7 +148,6 @@ Configure your active admin model file end ``` - ## Copyright Copyright (c) 2012 Stefano Verna, Cantiere Creativo