class Spyro::ActionViewExtension::CollectionForHelper::Output::Map

Public Instance Methods

render() click to toggle source
# File lib/spyro/collections/outputs/map.rb, line 11
def render
  locations = @unicollection.rows.map do |r|
    r[:data].map(&:value).join(', ')
  end

  image_tag "http://maps.googleapis.com/maps/api/staticmap?size=600x300&maptype=roadmap&sensor=false&#{locations.map {|location| "markers=#{location}"}.join('&')}"
end