Sha256: d8f76661d9b42ff89804838e2234e3343eecd1ff5bc34cc8bfdcc77e45f9b944
Contents?: true
Size: 333 Bytes
Versions: 4
Compression:
Stored size: 333 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) json = "[" each do |object| json += Gmaps4rails.create_json(object, &block).to_s end json.chop!.chop! unless json == "[" json += "]" end end
Version data entries
4 entries across 4 versions & 1 rubygems