From 34be27f425b49e6592d5f6672df955010f304499 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 30 Oct 2013 11:02:10 +1100 Subject: [PATCH] table_exists should be called aggresively while it is false or nil, to avoid bootstrapping issues don't test 1.9.3 in travis, it blows up randomly due to incorrect implementation of weak refs in 1.9.3 --- .travis.yml | 1 - lib/site_settings/db_provider.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bca5f47ed53..5eb80f385d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: ruby rvm: - - 1.9.3 - 2.0.0 before_script: - cp config/database.yml.development-sample config/database.yml diff --git a/lib/site_settings/db_provider.rb b/lib/site_settings/db_provider.rb index 21a5ea3b096..0a9a288e636 100644 --- a/lib/site_settings/db_provider.rb +++ b/lib/site_settings/db_provider.rb @@ -58,7 +58,7 @@ class SiteSettings::DbProvider # table is not in the db yet, initial migration, etc def table_exists? - @table_exists = ActiveRecord::Base.connection.table_exists? @model.table_name if @table_exists == nil + @table_exists = ActiveRecord::Base.connection.table_exists? @model.table_name unless @table_exists @table_exists end