summaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2010-11-10 08:12:18 +0100
committerJochen Topf <jochen@topf.org>2010-11-10 08:12:18 +0100
commitc44b109b1740cd9e58bd8d0640391e2435ebfdea (patch)
treec61575af9e0cf86be338e2d92c8d55d799172423 /web/lib
parent5b2e986a24e4d51c3103b257516cff758d087cbf (diff)
downloadtaginfo-c44b109b1740cd9e58bd8d0640391e2435ebfdea.tar
taginfo-c44b109b1740cd9e58bd8d0640391e2435ebfdea.tar.gz
Cleanup
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/reports.rb2
-rw-r--r--web/lib/test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/reports.rb b/web/lib/reports.rb
index f3f363c..3412a8b 100644
--- a/web/lib/reports.rb
+++ b/web/lib/reports.rb
@@ -5,7 +5,7 @@
attr_reader :title, :sources
def self.reports
- @@reports.sort{ |a,b| a.title <=> b.title }
+ @@reports.sort_by{ |report| report.title }
end
def initialize(title, sources)
diff --git a/web/lib/test.rb b/web/lib/test.rb
index fdd36b9..6d59e2b 100644
--- a/web/lib/test.rb
+++ b/web/lib/test.rb
@@ -14,7 +14,7 @@ class Taginfo < Sinatra::Base
@tags = @db.select("SELECT key, count, (count - ?) / (? - ?) AS scale, in_wiki, in_josm FROM popular_keys ORDER BY count DESC LIMIT #{limit}", @min.to_f, @max, @min).
execute().
each_with_index{ |tag, idx| tag['pos'] = (limit - idx) / limit.to_f }.
- sort{ |a,b| a['key'] <=> b['key'] }
+ sort_by{ |row| row['key'] }
erb :'test/tags'
end