From 0d1f192c54ab65a4a1c938553e5d87be65a966e8 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 8 Feb 2023 04:36:23 -0500 Subject: Apply Rubocop Performance/BlockGivenWithExplicitBlock (#23441) * Apply Rubocop Performance/BlockGivenWithExplicitBlock * Unprefix used block parameter --- app/models/trends/history.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/trends') diff --git a/app/models/trends/history.rb b/app/models/trends/history.rb index 03d62103f..83532e7bc 100644 --- a/app/models/trends/history.rb +++ b/app/models/trends/history.rb @@ -87,7 +87,7 @@ class Trends::History end def each(&block) - if block_given? + if block (0...7).map { |i| yield(get(i.days.ago)) } else to_enum(:each) -- cgit