module ActionView::Helpers::AssetUrlHelper
def video_path(source, options = {})
video_path("/trailers/hd.avi") # => /trailers/hd.avi
video_path("trailers/hd.avi") # => /videos/trailers/hd.avi
video_path("hd.avi") # => /videos/hd.avi
video_path("hd") # => /videos/hd
Used internally by +video_tag+ to build the video path.
Full paths from the document root will be passed through.
Computes the path to a video asset in the public videos directory.
def video_path(source, options = {}) path_to_asset(source, { type: :video }.merge!(options)) end