Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-10-04 14:58:32 +0300
committerTim Zallmann <tzallmann@gitlab.com>2017-10-04 15:27:09 +0300
commit27577e8e2b7bf18c0dbc402e5efad4905c5a154c (patch)
tree1ee6664b53459d48b9d29b59991c24e705e18143 /app/helpers/lazy_image_tag_helper.rb
parent6168e33e9e2f327f078e07b71c466dcc9fa9813a (diff)
Fixed Tests
Diffstat (limited to 'app/helpers/lazy_image_tag_helper.rb')
-rw-r--r--app/helpers/lazy_image_tag_helper.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/helpers/lazy_image_tag_helper.rb b/app/helpers/lazy_image_tag_helper.rb
index 4def806f1c0..2b5e9a9ef57 100644
--- a/app/helpers/lazy_image_tag_helper.rb
+++ b/app/helpers/lazy_image_tag_helper.rb
@@ -9,11 +9,12 @@ module LazyImageTagHelper
unless options.delete(:lazy) == false
options[:data] ||= {}
- if options.delete(:use_original_source)
- options[:data][:src] = source
- else
- options[:data][:src] = path_to_image(source)
- end
+ options[:data][:src] = if options.delete(:use_original_source)
+ source
+ else
+ path_to_image(source)
+ end
+
options[:class] ||= ""
options[:class] << " lazy"