|
|
@ -57,6 +57,14 @@ class Users::VideosController < Users::BaseController
|
|
|
|
|
|
|
|
|
|
|
|
def current_video
|
|
|
|
def current_video
|
|
|
|
@_current_video ||= observed_user.videos.find_by(id: params[:id])
|
|
|
|
@_current_video ||= observed_user.videos.find_by(id: params[:id])
|
|
|
|
|
|
|
|
if @_current_video.nil?
|
|
|
|
|
|
|
|
video = Video.find_by(id: params[:id])
|
|
|
|
|
|
|
|
if video.course_videos.present?
|
|
|
|
|
|
|
|
video
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
@_current_video
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def search_params
|
|
|
|
def search_params
|
|
|
|