diff --git a/app/models/commercial.rb b/app/models/commercial.rb
index 5acda134..51f8b7f5 100644
--- a/app/models/commercial.rb
+++ b/app/models/commercial.rb
@@ -18,10 +18,16 @@ class Commercial < ApplicationRecord
resource = OEmbed::Providers.get(url, maxwidth: 560, maxheight: 315)
{ html: resource.html.html_safe }
rescue StandardError => exception
- { error: exception.message }
+ { html: iframe_fallback(url) }
+ # { error: exception.message }
end
end
+ def self.iframe_fallback(url)
+ #
Open in a new tab
+ "".html_safe
+ end
+
def self.read_file(file)
errors = {}
errors[:no_event] = []
@@ -67,11 +73,10 @@ class Commercial < ApplicationRecord
OEmbed::Providers::Instagram,
speakerdeck
)
-
- OEmbed::Providers.register_fallback(
- OEmbed::ProviderDiscovery,
- OEmbed::Providers::Noembed
- )
+ # OEmbed::Providers.register_fallback(
+ # OEmbed::ProviderDiscovery,
+ # OEmbed::Providers::Noembed
+ # )
end
def conference_id