Sha256: b27dd31f170bacbb652e803704a2dd98287f3dfe86026717afba58b84caaf7cb

Contents?: true

Size: 737 Bytes

Versions: 68

Compression:

Stored size: 737 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class WidgetsController < Decidim::ApplicationController
    skip_before_action :verify_authenticity_token
    after_action :allow_iframe, only: :show
    helper ResourceHelper

    layout "decidim/widget"

    helper_method :model, :iframe_url, :current_participatory_space

    def show
      respond_to do |format|
        format.js { render "decidim/widgets/show" }
        format.html
      end
    end

    private

    def current_participatory_space
      @current_participatory_space ||= model.component.participatory_space
    end

    def iframe_url
      raise NotImplementedError
    end

    def allow_iframe
      response.headers.delete "X-Frame-Options"
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
decidim-core-0.26.10 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.9 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.5 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.8 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.4 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.3 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.7 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.5 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.2 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.1 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.4 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.0 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.3 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.0.rc2 app/controllers/decidim/widgets_controller.rb
decidim-core-0.27.0.rc1 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.2 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.1 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.0 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.0.rc2 app/controllers/decidim/widgets_controller.rb
decidim-core-0.26.0.rc1 app/controllers/decidim/widgets_controller.rb