Open tomya-n opened 23 hours ago
The changes involve the addition of a new conditional block in the show.html.erb
file located in the app/views/archives
directory. This block checks for the presence of a video attached to the @archive
object. If a video is available, a <div>
element is added to the article's header, containing a link for downloading the video. The link is created using the link_to
helper method, labeled "ダウンロード" (Download), and points to the video file stored in @archive.video
, with the download
attribute set to the sanitized title of the archive.
File Path | Change Summary |
---|---|
app/views/archives/show.html.erb | Added a conditional <div> for a download link for the video associated with the archive, labeled "ダウンロード". |
sequenceDiagram
participant User
participant View
participant Archive
User->>View: Request to view archive
View->>Archive: Fetch archive details
Archive-->>View: Return archive data including video
View-->>User: Display archive with download link
User->>View: Clicks on download link
View->>User: Initiates video download
🐇 "In the archives, a link does appear,
For videos to download, with joy and cheer.
'ダウンロード' it says, a title so bright,
A hop and a click, everything feels right!
With every archive, a treasure we find,
A video to cherish, a joy intertwined!" 🥕
これで動画が問題なくダウンロード出来ていればできるはず!
Summary by CodeRabbit