Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #179 from ms32035/master

Added to_i cast fixing String to number comparison error
  • Loading branch information...
commit 0a557332f6965a9049aedc8cf23d5788542e2ba2 2 parents 9fa907b + 68437b9
@cantino 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.