Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
class Videos::ReportPublicationsController < ApplicationController
before_action :set_video
def create
@video.publish_report!
redirect_to [@video, :video_analyses], notice: "Report has been published"
end
def destroy
@video.unpublish_report!
redirect_to [@video, :video_analyses], notice: "Report has been un-published"
end
private
def videos
policy_scope(Video)
end
def set_video
@video = authorize videos.find(params[:video_id]), policy_class: Videos::ReportPublicationPolicy
end
end