16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/helpers/pageflow/chart/scraped_sites_helper.rb', line 16
def scraped_site_iframe(configuration)
data_attributes = {}
if configuration['chart_url']
data_attributes = {
src: configuration['chart_url'].gsub(/^https?:/, '')
}
elsif (scraped_site = find_scraped_site(configuration))
data_attributes = {
src: scraped_site.html_file_url,
customize_layout: true,
use_custom_theme: scraped_site.use_custom_theme ? true : nil
}
end
content_tag(:iframe, '', IFRAME_ATTRIBUTES.merge(data: data_attributes))
end
|