Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added to_i cast fixing String to number comparison error

  • Loading branch information...
commit 68437b9e0a787643f14d12dc76f55f083ecd900d 1 parent 882fe52
@ms32035 ms32035 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 db/migrate/20131223032112_switch_to_json_serialization.rb
View
4 db/migrate/20131223032112_switch_to_json_serialization.rb
@@ -37,8 +37,8 @@ def mysql?
end
def data_exists?
- events = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("events")}").first.first
- agents = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("agents")}").first.first
+ events = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("events")}").first.first.to_i
+ agents = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("agents")}").first.first.to_i
agents + events > 0
end
Please sign in to comment.
Something went wrong with that request. Please try again.