gmaps4rails 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  == Google Maps for Rails (gmaps4rails)
2
2
 
3
- Gmaps4rails is developped to simply create a Google Map:
3
+ Gmaps4rails is developed to simply create a Google Map:
4
4
 
5
5
  - directly from your model,
6
6
 
@@ -23,15 +23,15 @@ module Gmaps4rails
23
23
  Rails.logger.warn(e)
24
24
  #TODO add customization here?
25
25
  else #if no exception, save the values
26
- self.send(gmaps4rails_options[:lng_column]+"=", coordinates.first[:lng]) if self.respond_to?(gmaps4rails_options[:lng_column]+"=")
27
- self.send(gmaps4rails_options[:lat_column]+"=", coordinates.first[:lat]) if self.respond_to?(gmaps4rails_options[:lat_column]+"=")
26
+ self.send("#{gmaps4rails_options[:lng_column]}=", coordinates.first[:lng]) if self.respond_to?("#{gmaps4rails_options[:lng_column]}=")
27
+ self.send("#{gmaps4rails_options[:lat_column]}=", coordinates.first[:lat]) if self.respond_to?("#{gmaps4rails_options[:lat_column]}=")
28
28
  unless gmaps4rails_options[:normalized_address].nil?
29
- self.send(gmaps4rails_options[:normalized_address].to_s+"=", coordinates.first[:matched_address])
29
+ self.send("#{gmaps4rails_options[:normalized_address]}=", coordinates.first[:matched_address])
30
30
  end
31
31
  # Call the callback method to let the user do what he wants with the data
32
32
  self.send(gmaps4rails_options[:callback], coordinates.first[:full_data]) unless gmaps4rails_options[:callback].nil?
33
33
  if Gmaps4rails.condition_eval(self, gmaps4rails_options[:check_process])
34
- self[gmaps4rails_options[:checker]] = true
34
+ self.send("#{gmaps4rails_options[:checker]}=", true)
35
35
  end
36
36
  end
37
37
  end
@@ -58,17 +58,17 @@ module Gmaps4rails
58
58
  #instance method containing all the options to configure the behaviour of the gem regarding the current Model
59
59
  define_method "gmaps4rails_options" do
60
60
  {
61
- :lat_column => args[:lat] || "latitude",
62
- :lng_column => args[:lng] || "longitude",
63
- :check_process => args[:check_process].nil? ? true : args[:check_process],
64
- :checker => args[:checker] || "gmaps",
65
- :msg => args[:msg] || "Address invalid",
66
- :validation => args[:validation].nil? ? true : args[:validation],
67
- :normalized_address => args[:normalized_address],
68
- :address => args[:address] || "gmaps4rails_address",
69
- :callback => args[:callback],
70
- :language => args[:language] || "en",
71
- :protocol => args[:protocol] || "http"
61
+ :lat_column => args[:lat] || "latitude",
62
+ :lng_column => args[:lng] || "longitude",
63
+ :check_process => args[:check_process].nil? ? true : args[:check_process],
64
+ :checker => args[:checker] || "gmaps",
65
+ :msg => args[:msg] || "Address invalid",
66
+ :validation => args[:validation].nil? ? true : args[:validation],
67
+ :normalized_address => args[:normalized_address],
68
+ :address => args[:address] || "gmaps4rails_address",
69
+ :callback => args[:callback],
70
+ :language => args[:language] || "en",
71
+ :protocol => args[:protocol] || "http"
72
72
  }
73
73
  end
74
74
 
@@ -96,7 +96,7 @@ module Gmaps4rails
96
96
  # })
97
97
  # marker.title "i'm the title"
98
98
  # marker.sidebar "i'm the sidebar"
99
- # marker.json { :id => user.id }
99
+ # marker.json({ :id => user.id })
100
100
  # end
101
101
  #
102
102
  # For backward compability, a mere string could be passed:
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmaps4rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 3
10
- version: 1.4.3
9
+ - 4
10
+ version: 1.4.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benjamin Roth
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-01-20 00:00:00 Z
19
+ date: 2012-01-30 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: json
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements: []
108
108
 
109
109
  rubyforge_project:
110
- rubygems_version: 1.8.6
110
+ rubygems_version: 1.8.15
111
111
  signing_key:
112
112
  specification_version: 3
113
113
  summary: Enables easy display of items (taken from a Rails 3 model) on a Google Maps (JS API V3), OpenLayers, Mapquest and Bing. Geocoding + Directions included.