module UsefulHelpers::Helpers::VideosHelper

Public Instance Methods

url_for_video(source_path) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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