gmaps-rails 0.0.1 → 0.0.2

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: 327693bbe44f8208f1d9880344588f013b428ab3
4
- data.tar.gz: f70ac97858f5ca3d7e45b76fdd9b113f5c111ad3
3
+ metadata.gz: 26a0d560972b052e34a3c594f71c7bc0202d05c8
4
+ data.tar.gz: 99f52a8ba562a647edb6d3f80fbc8b9e3052029d
5
5
  SHA512:
6
- metadata.gz: 0ee9a32097e6e1aefffb6350bf70120cc1b444e3c4a87e8feee72556ffd9593da0a49946e3588e171dcd1bf69ccaab7786f3b2df2af22d353015e4647cd3f8af
7
- data.tar.gz: 1fb576e7e0414785fad9459bd0deedafe15b8e449f0c614cbd9796e7d663dd1bfb755625400fdd7d1fcaa0cbd896740f76d9c64a5eacfe4c7fbec422865d04a2
6
+ metadata.gz: bfe5a25fc48d49ec8e43515fcd741a3d3a591dc9afe4c0c65cb16f592dcb9f3eef66a721968d445067e96d0c663fd9a3b4abccc38503cd0dbf3a77e85551462a
7
+ data.tar.gz: 02352ef846005f40fcaf0720c233fb0525f865b44ec8dc2f149621ab9281c212defef22d8b53f6633790d5f27639e283fe9761e03ba6853ca22e48af266e6e34
data/README.md CHANGED
@@ -52,7 +52,7 @@ simply by requiring `gmaps` in `app/assets/javascripts/application.js` file.
52
52
  #### GMaps in Ruby
53
53
  In addition to that, this gem has helpers.
54
54
 
55
- You can define GMaps object in a controller or a presenter \(such as [Draper](https://github.com/drapergem/draper)\).
55
+ You can define GMaps object in a controller or presenter \(such as [Draper](https://github.com/drapergem/draper)\).
56
56
 
57
57
  ```ruby
58
58
  @map = GMaps.new(div: '#map', lat: -12.043333, lng: -77.028333)
@@ -73,7 +73,7 @@ You can show maps as follows:
73
73
  <script>
74
74
  jQuery(function() {
75
75
  <%= @map.to_js %>
76
- }
76
+ })
77
77
  </script>
78
78
  <body>
79
79
  <div sytle='width: 800px'>
@@ -1,5 +1,5 @@
1
1
  class GMaps
2
2
  module Rails
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  (function($, undefined) {
2
- $(function() {
2
+ var gmapsUjs = function() {
3
3
  var mapElements = $('[data-map]');
4
4
  for (var mi = 0, len = mapElements.length; mi < len; mi++) {
5
5
  var mapElement = $(mapElements[mi]);
@@ -11,5 +11,11 @@
11
11
  map[d.name].apply(map, d.args);
12
12
  }
13
13
  }
14
- });
14
+ };
15
+
16
+ if ((typeof Turbolinks === 'undefined') || $.turbo) {
17
+ $(gmapsUjs);
18
+ } else {
19
+ $(document).on("page:change", gmapsUjs);
20
+ }
15
21
  })( jQuery );
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmaps-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kentaro Imai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-05 00:00:00.000000000 Z
11
+ date: 2014-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails