Sha256: 9b65ec4dc47a35a49a4440985ffa09fba798f450c70698f02ca2c04cacb63dd0

Contents?: true

Size: 388 Bytes

Versions: 69

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class StaticMapController < Decidim::ApplicationController
    skip_before_action :store_current_location

    def show
      send_data StaticMapGenerator.new(resource).data, type: "image/jpeg", disposition: "inline"
    end

    private

    def resource
      @resource ||= GlobalID::Locator.locate_signed params[:sgid]
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
decidim-core-0.20.1 app/controllers/decidim/static_map_controller.rb
decidim-core-0.20.0 app/controllers/decidim/static_map_controller.rb
decidim-core-0.19.1 app/controllers/decidim/static_map_controller.rb
decidim-core-0.18.1 app/controllers/decidim/static_map_controller.rb
decidim-core-0.19.0 app/controllers/decidim/static_map_controller.rb
decidim-core-0.17.2 app/controllers/decidim/static_map_controller.rb
decidim-core-0.18.0 app/controllers/decidim/static_map_controller.rb
decidim-core-0.17.1 app/controllers/decidim/static_map_controller.rb
decidim-core-0.17.0 app/controllers/decidim/static_map_controller.rb