Skip to content
Browse files

Merge pull request #224 from nithinbekal/issue-223

Fix issue #223: to_gmaps4rails(&blk) doesn't work with Mongoid
  • Loading branch information...
2 parents 4ef0332 + 272f029 commit 12ba3e7d738a35c08f854272920575273b78b6de @apneadiving committed Jul 1, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 lib/gmaps4rails/base.rb
  3. +1 −1 lib/gmaps4rails/extensions/{array.rb → enumerable.rb}
  4. +1 −1 spec/models/user_spec.rb
View
1 .gitignore
@@ -9,3 +9,4 @@ test/dummy/log/**/*
test/dummy/.rvmrc
pkg
.idea
+.redcar
View
2 lib/gmaps4rails/base.rb
@@ -5,7 +5,7 @@
module Gmaps4rails
- require 'gmaps4rails/extensions/array'
+ require 'gmaps4rails/extensions/enumerable'
require 'gmaps4rails/extensions/hash'
autoload :ModelHandler, 'gmaps4rails/model_handler'
View
2 lib/gmaps4rails/extensions/array.rb → lib/gmaps4rails/extensions/enumerable.rb
@@ -1,4 +1,4 @@
-class Array
+module Enumerable
#Scopes on models generate Arrays
#this method enables short call to the json creation for all elements in the array
def to_gmaps4rails(&block)
View
2 spec/models/user_spec.rb
@@ -7,7 +7,7 @@
describe Gmaps4rails::ActsAsGmappable do
let(:user) { Factory(:user) }
- let(:invalid_user) { Factory.build(:invalid_user) }
+ let(:invalid_user) { FactoryGirl.build(:invalid_user) }
before(:each) do
Geocoding.stub_geocoding

0 comments on commit 12ba3e7

Please sign in to comment.
Something went wrong with that request. Please try again.