about summary refs log tree commit diff
path: root/app/models/trends/history.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/trends/history.rb')
-rw-r--r--app/models/trends/history.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/trends/history.rb b/app/models/trends/history.rb
index 74723e35c..83532e7bc 100644
--- a/app/models/trends/history.rb
+++ b/app/models/trends/history.rb
@@ -87,8 +87,8 @@ class Trends::History
   end
 
   def each(&block)
-    if block_given?
-      (0...7).map { |i| block.call(get(i.days.ago)) }
+    if block
+      (0...7).map { |i| yield(get(i.days.ago)) }
     else
       to_enum(:each)
     end