summaryrefslogtreecommitdiff
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
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