Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added to_i cast fixing String to number comparison error #179

Merged
merged 1 commit into from

2 participants

@ms32035

Problem experienced with Postgresql

@cantino cantino merged commit 0a55733 into from
@cantino
Owner

Thanks @ms32035!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.