gmaps4rails 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/gmaps4rails.rb +7 -5
  2. metadata +4 -4
@@ -17,11 +17,13 @@ if defined?(Rails) && Rails::VERSION::MAJOR == 3
17
17
  end
18
18
  end
19
19
 
20
- initializer "include acts_as_gmappable within ActiveRecord" do
21
- if defined? ::ActiveRecord
22
- ActiveRecord::Base.send :include, Gmaps4rails::ActsAsGmappable
23
- elsif defined? ::Mongoid
24
- Mongoid::Document.send :include, Gmaps4rails::ActsAsGmappable
20
+ initializer "include acts_as_gmappable within ORM" do
21
+ ActiveSupport.on_load(:active_record) do
22
+ ActiveRecord::Base.send(:include, Gmaps4rails::ActsAsGmappable)
23
+ end
24
+
25
+ ActiveSupport.on_load(:mongoid) do
26
+ Mongoid::Document.send(:include, Gmaps4rails::ActsAsGmappable)
25
27
  end
26
28
  end
27
29
 
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: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 1
10
- version: 1.4.1
9
+ - 2
10
+ version: 1.4.2
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-02 00:00:00 Z
19
+ date: 2012-01-05 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: json