diff options
author | Phil Hughes <me@iamphill.com> | 2016-02-23 12:06:26 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-02-23 12:06:26 +0300 |
commit | d80205b75502ad53b4db085b0fd7fc2a1cb54b05 (patch) | |
tree | 62f221b3f8045bca3736352f323a7b8081d6eea5 /app/controllers/projects/refs_controller.rb | |
parent | 7c8099853621cc2a244bf6e0fd37a8b503d1ec5e (diff) |
Fixes issue with file view rows not clickable on project main view
Fixed an issue where it would only load the first 25 commit data on project main view
Stopped the file view sending 1 too many requests
Fixes #3916
Diffstat (limited to 'app/controllers/projects/refs_controller.rb')
-rw-r--r-- | app/controllers/projects/refs_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index a8f091819ca..8aeff064732 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -64,9 +64,9 @@ class Projects::RefsController < Projects::ApplicationController } end - if @logs.present? - @log_url = namespace_project_tree_url(@project.namespace, @project, tree_join(@ref, @path || '/')) - @more_log_url = logs_file_namespace_project_ref_path(@project.namespace, @project, @ref, @path || '', offset: (@offset + @limit)) + offset = (@offset + @limit) + if contents.size > offset + @more_log_url = logs_file_namespace_project_ref_path(@project.namespace, @project, @ref, @path || '', offset: offset) end respond_to do |format| |