From 204486e824f0d2050a6fffce548d7191651e68c5 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 25 Jul 2014 16:49:40 +0100 Subject: [PATCH] More modernisations for the statistics script --- script/statistics | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script/statistics b/script/statistics index 315c6cd18..c5d401227 100755 --- a/script/statistics +++ b/script/statistics @@ -15,11 +15,11 @@ puts "

OpenStreetMap stats report run at #{start_time.to_s}

" begin ActiveRecord::Base.transaction do - user_count = User.count(:conditions => { :status => ["active", "confirmed", "suspended"] }) - tracepoint_count = Tracepoint.count() - node_count = Node.count(:conditions => "visible = true") - way_count = Way.count(:conditions => "visible = true") - relation_count = Relation.count(:conditions => "visible = true") + user_count = User.where(:status => ["active", "confirmed", "suspended"]).count + tracepoint_count = Tracepoint.count + node_count = Node.where(:visible => true).count + way_count = Way.where(:visible => true).count + relation_count = Relation.where(:visible => true).count puts "" puts "" -- 2.43.2
Number of users#{user_count}