Commit aaff356655e47d78d1da6adca314ccf11f02268c

Authored by Dmitriy Zaporozhets
1 parent b47646ef

Redirect to import page from show when import in progress

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
app/controllers/projects_controller.rb
... ... @@ -48,6 +48,11 @@ class ProjectsController &lt; ApplicationController
48 48 end
49 49  
50 50 def show
  51 + if @project.import_in_progress?
  52 + redirect_to import_project_path(@project)
  53 + return
  54 + end
  55 +
51 56 return authenticate_user! unless @project.public? || current_user
52 57  
53 58 limit = (params[:limit] || 20).to_i
... ...