lib/gmaps4rails.rb in gmaps4rails-1.4.0 vs lib/gmaps4rails.rb in gmaps4rails-1.4.1

- old
+ new

@@ -16,12 +16,13 @@ app.middleware.use ::ActionDispatch::Static, "#{root}/public" end end initializer "include acts_as_gmappable within ActiveRecord" do - if defined?(::ActiveRecord::Base) - ActiveRecord::Base.send(:include, Gmaps4rails::ActsAsGmappable::InstanceMethods) - ActiveRecord::Base.send(:extend, Gmaps4rails::ActsAsGmappable::ClassMethods) + if defined? ::ActiveRecord + ActiveRecord::Base.send :include, Gmaps4rails::ActsAsGmappable + elsif defined? ::Mongoid + Mongoid::Document.send :include, Gmaps4rails::ActsAsGmappable end end end end \ No newline at end of file