Sha256: 95df4fb607f26be5c4f73dce6c0b4407d066a00e54fccea61b4492fe07459aae

Contents?: true

Size: 454 Bytes

Versions: 1

Compression:

Stored size: 454 Bytes

Contents

# frozen_string_literal: true
module Decidim
  module WidgetUrlsHelper
    def embed_modal_for(url)
      js_embed_code = String.new(content_tag(:script, "", src: url))
      embed_code = String.new(content_tag(:noscript, content_tag(:iframe, "", src: url.gsub(".js", ".html"), frameborder: 0, scrolling: "vertical")))
      render partial: "decidim/shared/embed_modal", locals: { js_embed_code: js_embed_code, embed_code: embed_code }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-core-0.1.0 app/helpers/decidim/widget_urls_helper.rb