Skip to content

Commit 34be27f

Browse files
committed
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
1 parent bb135fa commit 34be27f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: ruby
22
rvm:
3-
- 1.9.3
43
- 2.0.0
54
before_script:
65
- cp config/database.yml.development-sample config/database.yml

lib/site_settings/db_provider.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def current_site
5858

5959
# table is not in the db yet, initial migration, etc
6060
def table_exists?
61-
@table_exists = ActiveRecord::Base.connection.table_exists? @model.table_name if @table_exists == nil
61+
@table_exists = ActiveRecord::Base.connection.table_exists? @model.table_name unless @table_exists
6262
@table_exists
6363
end
6464

0 commit comments

Comments
 (0)