Skip to content

Commit

Permalink
Allow manually fetching video details
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubery committed Dec 6, 2024
1 parent 845db78 commit 1be8451
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/admin/media_items.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@
f.input :libraries, :as => :select, :input_html => { :multiple => true }
f.actions
end

action_item :fetch_details, only: [:show, :edit] do
link_to "Fetch Details", fetch_details_admin_media_item_path(resource)
end

member_action :fetch_details, method: :get do
resource.update(updated_at: nil, reachable: nil)
redirect_to admin_media_item_path, notice: "Fetched!"
end
end

0 comments on commit 1be8451

Please sign in to comment.