From a685a865c6a9006578cdb14a339376724c7d8987 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Mon, 2 Jan 2017 05:02:48 +0900 Subject: Prefer `each` over `map` because unused return value --- activerecord/lib/active_record/counter_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb index 3e637ad2b2..020f4b872e 100644 --- a/activerecord/lib/active_record/counter_cache.rb +++ b/activerecord/lib/active_record/counter_cache.rb @@ -106,7 +106,7 @@ module ActiveRecord if touch object = find(id) - touch_updates(object, touch).map do |column, touch_time| + touch_updates(object, touch).each do |column, touch_time| updates << "#{connection.quote_column_name(column.to_s)} = #{connection.quote(touch_time)}" end end -- cgit v1.2.3