Skip to content

Commit

Permalink
Add to_gmaps4rails method to Enumerable rather than Array. Fixes issue
Browse files Browse the repository at this point in the history
…apneadiving#223.

- Rename lib/gmaps4rails/extensions/array.rb to lib/gmaps4rails/extensions/enumerable.rb.
- Add redcar temp files to .gitignore.
  • Loading branch information
nithinbekal committed Jun 26, 2012
1 parent 4ef0332 commit 99c2dd4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ test/dummy/log/**/*
test/dummy/.rvmrc
pkg
.idea
.redcar
2 changes: 1 addition & 1 deletion lib/gmaps4rails/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module Gmaps4rails

require 'gmaps4rails/extensions/array'
require 'gmaps4rails/extensions/enumerable'
require 'gmaps4rails/extensions/hash'

autoload :ModelHandler, 'gmaps4rails/model_handler'
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 99c2dd4

Please sign in to comment.