Permalink
Browse files

Add to_gmaps4rails method to Enumerable rather than Array. Fixes issue

…#223.

- Rename lib/gmaps4rails/extensions/array.rb to lib/gmaps4rails/extensions/enumerable.rb.
- Add redcar temp files to .gitignore.
  • Loading branch information...
1 parent 4ef0332 commit 99c2dd4ae67d56773f54a1788e7dc2a8d166fd03 @nithinbekal nithinbekal committed Jun 26, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 lib/gmaps4rails/base.rb
  3. +1 −1 lib/gmaps4rails/extensions/{array.rb → enumerable.rb}
View
@@ -9,3 +9,4 @@ test/dummy/log/**/*
test/dummy/.rvmrc
pkg
.idea
+.redcar
View
@@ -5,7 +5,7 @@
module Gmaps4rails
- require 'gmaps4rails/extensions/array'
+ require 'gmaps4rails/extensions/enumerable'
require 'gmaps4rails/extensions/hash'
autoload :ModelHandler, 'gmaps4rails/model_handler'
@@ -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)

0 comments on commit 99c2dd4

Please sign in to comment.