Sha256: 7a71b80301a497acbbaaed847ab75db3215f8cd17e637e43033a9ccb78d51330
Contents?: true
Size: 499 Bytes
Versions: 16
Compression:
Stored size: 499 Bytes
Contents
# frozen_string_literal: true module Lcms module Engine module MediaHelper def embed_media(resource) if resource.video? embed_video(resource.embed_video_url) elsif resource.podcast? embed_podcast = resource.embed_podcast embed_podcast.try(:html_safe) || resource.url end end def embed_video(embed_url) content_tag(:iframe, nil, src: embed_url, allowfullscreen: true, frameborder: 0) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems