summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-11-17 16:08:58 +0100
committerDouwe Maan <douwe@gitlab.com>2015-11-17 16:33:38 +0100
commite49190cad933abc38271b46cded8150fd9b15568 (patch)
tree9bae94b9d8b91716a3bca2be0d8bb4835eee946a /app/views/projects/diffs
parent1c040b3f0a3ecb18fc8fdea3cf99b70edad8d873 (diff)
downloadgitlab-ce-e49190cad933abc38271b46cded8150fd9b15568.tar.gz
Don't use params[:view] directly.param-view
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r--app/views/projects/diffs/_diffs.html.haml2
-rw-r--r--app/views/projects/diffs/_file.html.haml3
2 files changed, 2 insertions, 3 deletions
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml
index e46bf1ab1e7..416fb4da071 100644
--- a/app/views/projects/diffs/_diffs.html.haml
+++ b/app/views/projects/diffs/_diffs.html.haml
@@ -1,4 +1,4 @@
-- if params[:view] == 'parallel'
+- if diff_view == 'parallel'
- fluid_layout true
- diff_files = safe_diff_files(diffs)
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index 410ff6abb43..c745b4e69bf 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -33,7 +33,7 @@
-# Skipp all non non-supported blobs
- return unless blob.respond_to?('text?')
- if blob.text?
- - if params[:view] == 'parallel'
+ - if diff_view == 'parallel'
= render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob, index: i
- else
= render "projects/diffs/text_file", diff_file: diff_file, index: i
@@ -42,4 +42,3 @@
= render "projects/diffs/image", diff_file: diff_file, old_file: old_file, file: blob, index: i
- else
.nothing-here-block No preview for this file type
-