From 34be27f425b49e6592d5f6672df955010f304499 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
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 bca5f47ed..5eb80f385 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 21a5ea3b0..0a9a288e6 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