Module: Decidim::WidgetUrlsHelper
- Defined in:
- app/helpers/decidim/widget_urls_helper.rb
Instance Method Summary collapse
Instance Method Details
#embed_modal_for(url, options = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/helpers/decidim/widget_urls_helper.rb', line 5 def (url, = {}) extra_locals = [:locals] || {} = String.new(content_tag(:script, "", src: url)) = 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: , embed_code: }.merge(extra_locals) end |