Module: UsefulHelpers::Helpers::VideosHelper
- Defined in:
- lib/useful_helpers/helpers/videos_helper.rb
Instance Method Summary collapse
- #url_for_video(source_path) ⇒ Object
- #url_for_video_thumbnail(video, style = :small) ⇒ Object
- #video_thumbnail(video, style = :small) ⇒ Object
Instance Method Details
#url_for_video(source_path) ⇒ Object
5 6 7 |
# File 'lib/useful_helpers/helpers/videos_helper.rb', line 5 def url_for_video(source_path) "http://" + request.url.split("/")[2] + source_path end |
#url_for_video_thumbnail(video, style = :small) ⇒ Object
9 10 11 |
# File 'lib/useful_helpers/helpers/videos_helper.rb', line 9 def url_for_video_thumbnail(video, style=:small) video.data.url(style) end |
#video_thumbnail(video, style = :small) ⇒ Object
13 14 15 |
# File 'lib/useful_helpers/helpers/videos_helper.rb', line 13 def video_thumbnail(video, style=:small) raw "<img src=\"#{video.data.url(style)}\" alt=\"#{video.title}\" />" end |