Upstream sync

This commit is contained in:
Senad Uka
2020-07-03 10:23:03 +02:00
parent d6a3542308
commit 2dea0f29b9
32 changed files with 860 additions and 72 deletions

View File

@@ -3,6 +3,7 @@ class VideosController < ApplicationController
before_action :set_project, only: [:index, :new, :create, :landing]
before_action :set_video, only: [:edit, :update]
before_action :show_splash_screen, only: :index
def landing
authorize Video, :new?
@@ -60,6 +61,10 @@ class VideosController < ApplicationController
private
def show_splash_screen
render :splash if videos.count.zero?
end
def set_project
@project = policy_scope(Project).find(params[:project_id])
end