diff options
author | Jochen Topf <jochen@topf.org> | 2011-10-10 16:05:30 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2011-10-10 16:05:30 +0200 |
commit | 3ee5a07b907df9568a5b26093dbe7392886eb508 (patch) | |
tree | 6751a4c73e044f27bc4f6d56738c6adecabdab7b /web/taginfo.rb | |
parent | cd7a6f5837545d255c5394684b42f8682ebc7154 (diff) | |
download | taginfo-3ee5a07b907df9568a5b26093dbe7392886eb508.tar taginfo-3ee5a07b907df9568a5b26093dbe7392886eb508.tar.gz |
Use .to_i == 1 instead of == '1'
Different Sqlite versions (or ruby sqlite driver versions) seem to return
contents of integer columns in different ways. This should make it work
in all versions.
Diffstat (limited to 'web/taginfo.rb')
-rwxr-xr-x | web/taginfo.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/taginfo.rb b/web/taginfo.rb index cdcdc23..b6a017f 100755 --- a/web/taginfo.rb +++ b/web/taginfo.rb @@ -52,7 +52,7 @@ TAGCLOUD_NUMBER_OF_TAGS = 200 db = SQL::Database.new('../../data') db.select('SELECT * FROM sources ORDER BY no').execute().each do |source| - Source.new source['id'], source['name'], source['data_until'], source['update_start'], source['update_end'], source['visible'] == '1' + Source.new source['id'], source['name'], source['data_until'], source['update_start'], source['update_end'], source['visible'].to_i == 1 end DATA_UNTIL = db.select("SELECT min(data_until) FROM sources").get_first_value().sub(/:..$/, '') |