diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-08 14:17:43 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-08 14:17:43 +0300 |
commit | 1490d65e4541f8fdf4fc8257b0621bdd750dd904 (patch) | |
tree | 2e44f30aa03a5c2ddc04f257b40c8fc60111d178 /app/controllers | |
parent | 1f98beba79b16fc0167f8b3396b58d047edade37 (diff) | |
parent | dbffaaa97e7a195dc5421237392788a03a6b763a (diff) |
Merge branch 'blob-load-all-data' into 'master'
Blob#load_all_data! doesn’t need an argument
See merge request !11977
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 7025c7a1de6..4f53929a308 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -55,7 +55,7 @@ class Projects::BlobController < Projects::ApplicationController def edit if can_collaborate_with_project? - blob.load_all_data!(@repository) + blob.load_all_data! else redirect_to action: 'show' end @@ -74,7 +74,7 @@ class Projects::BlobController < Projects::ApplicationController def preview @content = params[:content] - @blob.load_all_data!(@repository) + @blob.load_all_data! diffy = Diffy::Diff.new(@blob.data, @content, diff: '-U 3', include_diff_info: true) diff_lines = diffy.diff.scan(/.*\n/)[2..-1] diff_lines = Gitlab::Diff::Parser.new.parse(diff_lines) @@ -111,7 +111,7 @@ class Projects::BlobController < Projects::ApplicationController private def blob - @blob ||= Blob.decorate(@repository.blob_at(@commit.id, @path), @project) + @blob ||= @repository.blob_at(@commit.id, @path) if @blob @blob |