Skip to content

Instantly share code, notes, and snippets.

View dareosK's full-sized avatar
🎯
Focusing

Dareos Khalili dareosK

🎯
Focusing
View GitHub Profile
@dareosK
dareosK / videos_helper.rb
Created September 29, 2022 11:43 — forked from a-barbieri/videos_helper.rb
Rails helper to embed YouTube and Vimeo iframe in view
# Helpers for better embedding and manipulation of videos
# Place this code in app/helpers/videos_helper.rb
# Then from any view you can add:
#
# <%= get_video_iframe('http://the.video.url') %>
#
# Optionally you can add width and height.
#
# <%= get_video_iframe('http://the.video.url', '1600px', '900px') %>
#