@video = Video.where(id: permitted_params[:id]).first!
if @video
#your code
else
error!({:error_message => "Record Could not found"}, 422)
end
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more