I thought that it would be nice to share this not only because it would save others a lot of time figuring out this mess. So if you find something that could be improved or is just wrong, I will happily update this post.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') %> | |
# |