Sha256: 9a9ebca3fcc99581b431f8aa08ab14c44daad906417f54548b0f345db4e988ac
Contents?: true
Size: 353 Bytes
Versions: 1
Compression:
Stored size: 353 Bytes
Contents
class Array #Scopes on models generate Arrays #this method enables short call to the json creation for all elements in the array def to_gmaps4rails(&block) output = "[" json_array = [] each do |object| json_array << Gmaps4rails.create_json(object, &block).to_s end output << json_array * (",") output << "]" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gmaps4rails-1.4.0 | lib/gmaps4rails/extensions/array.rb |