autocomplete_address_safe 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63d5cd65f8129baeca1cb2324064af96e0306f6e
4
- data.tar.gz: b034ed1ee6354ccf2666270e28487f1a1e55a963
3
+ metadata.gz: 757e4c8a23c7e3255be5920b0044700a5dd14192
4
+ data.tar.gz: 1ef3907a002d7104a4f17fbf163fd3b14fd96e54
5
5
  SHA512:
6
- metadata.gz: 1638aca92593015d7dcddc66783e9f3b82fc8bce8b6ef312c452af31ff1754956e9bb6f2649cba0cdd7811c6719b8da19da20a5a5592650baf7698335d766941
7
- data.tar.gz: dc61ce43fb17f0fd02eae1eb91aa869775b6a529780dfc3577bb27161de2a9cffb77b3af4711a8eb9d333340a6843dd7b69a5f535ceb7ba9b8af8e179d4bbf7e
6
+ metadata.gz: dd23a8b3c3c6116932a0d95877049e36dcedda6b35965229147172937765e0256158563ad5e18c9f1637005f1aaca336fce0a4235efcdbd5c89d8333c73eb916
7
+ data.tar.gz: f43ae43ecc63b0de38c8f32d9a51e2371d794675af41b2b3f82b352a8898c7d1a7127b1b37dd54f44aee83272fa392035368134e0695033a3867ebd3f876a180
data/Gemfile CHANGED
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in autocomplete_address_safe.gemspec
4
4
  gemspec
5
+ gem 'jquery-rails'
data/README.md CHANGED
@@ -6,6 +6,22 @@ TODO: Delete this and the text above, and describe your gem
6
6
 
7
7
  ## Installation
8
8
 
9
+ First add the js google maps for example
10
+ <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script>
11
+
12
+ Second add the js in the view
13
+
14
+ <script type="text/javascript">
15
+ var ready;
16
+
17
+ ready = function(){
18
+ $('body').attr('onload', 'initialize()');
19
+ }
20
+
21
+ $('document').ready(ready);
22
+ $('document').on('page:load', ready);
23
+ </script>
24
+
9
25
  Add this line to your application's Gemfile:
10
26
 
11
27
  ```ruby
@@ -26,7 +42,7 @@ The first step add next code in "app/assets/javascripts/application.js"
26
42
 
27
43
  //= require autocomplete_safe
28
44
 
29
- The second step add in your view
45
+ The second step add in your view
30
46
  <%= field_complete %>
31
47
 
32
48
  And add other input id's (lat, long, locality, country, administrative_area_level_1, route, street_number, postal_code)
@@ -1,4 +1,6 @@
1
1
 
2
+
3
+
2
4
  var __AutocompleteAddress ={
3
5
  options: {
4
6
  lat: <%= Rails.application.config.autocomplete_address_safe.lat %>,
@@ -1 +1,4 @@
1
+ // require 'autocomplete_address_options'
2
+ // require 'barracuda'
3
+ // require 'googlemaps'
1
4
  //= require_tree .
@@ -1,3 +1 @@
1
- $('document').ready(function(){
2
- $('body').attr('onload', 'initialize()');
3
- });
1
+
@@ -1,6 +1,7 @@
1
1
  // This example displays an address form, using the autocomplete feature
2
2
  // of the Google Places API to help users fill in the information.
3
- document.write('<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script>');
3
+ //document.write('<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places" ></script>');
4
+
4
5
 
5
6
  var placeSearch, autocomplete;
6
7
  var componentForm = {
@@ -32,9 +33,7 @@ function fillInAddress() {
32
33
  document.getElementById(component).value = '';
33
34
  document.getElementById(component).disabled = false;
34
35
  }*/
35
- console.log(place);
36
- console.log(place.geometry.location.lat());
37
- console.log(place.geometry.location.lng());
36
+
38
37
  //Get each component of the address from the place details
39
38
  //and fill the corresponding field on the form.
40
39
  for (var i = 0; i < place.address_components.length; i++) {
@@ -1,3 +1,3 @@
1
1
  module AutocompleteAddressSafe
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autocomplete_address_safe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saul Felipe Ramirez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-13 00:00:00.000000000 Z
11
+ date: 2015-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler