Redirect to import page from show when import in progress

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-03-13 10:27:05 +02:00
parent b47646ef13
commit aaff356655
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
1 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,11 @@ class ProjectsController < ApplicationController
end
def show
if @project.import_in_progress?
redirect_to import_project_path(@project)
return
end
return authenticate_user! unless @project.public? || current_user
limit = (params[:limit] || 20).to_i