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:
authorPhil Hughes <me@iamphill.com>2016-04-26 11:02:28 +0300
committerPhil Hughes <me@iamphill.com>2016-04-26 11:04:35 +0300
commit97c1a1ef64cdce75afa24075ea77333e76c9ccbf (patch)
tree54e960093847aee8af2d865b461941b0c8b482e7 /app/helpers/search_helper.rb
parent7ee5de19804842033c3cfdc2bf1209c27adcd7b7 (diff)
Updated based on feedback
Changed some variable names Fixed CHANGELOG entry
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 7f585cd5dd9..24c4c098c65 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -20,13 +20,13 @@ module SearchHelper
end
def search_entries_info(collection, scope, term)
- if collection.count > 0
- from = collection.offset_value + 1
- to = collection.offset_value + collection.length
- count = collection.total_count
+ return unless collection.count > 0
- "Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\""
- end
+ from = collection.offset_value + 1
+ to = collection.offset_value + collection.length
+ count = collection.total_count
+
+ "Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\""
end
private