htmlのvideoタグを生成するhelper
URL指定
<%= video_tag("https://sample.com/videos/sample.mp4", :autoplay => true, :loop => true) %>
= video_tag "https://sample.com/videos/sample.mp4", :autoplay => true, :loop => true
ファイルパス指定
public/assets/videos配下に動画ファイルを置いて
= video_tag "sample.mp4", :autoplay => true, :loop => true
<%= video_tag("sample.mp4", :autoplay => true, :loop => true) %>
まとめ
app/assets/videosに置いても読み込まれないのはなぜか & どうしたら読み込まれるのか
ここで
Returns an HTML video tag for the sources. If sources is a string, a single video tag will be returned. If sources is an array, a video tag with nested source tags for each source will be returned. The sources can be full paths or files that exists in your public videos directory.
full pathかpublic videoとあるからapp/assets/videosはそもそも読まれないのか