FIX: Make `DbProvider#table_exits?` work with multisite.
This commit is contained in:
parent
f496302c2c
commit
22a1db7b8a
|
@ -56,8 +56,13 @@ class SiteSettings::DbProvider
|
||||||
|
|
||||||
# table is not in the db yet, initial migration, etc
|
# table is not in the db yet, initial migration, etc
|
||||||
def table_exists?
|
def table_exists?
|
||||||
@table_exists = ActiveRecord::Base.connection.table_exists? @model.table_name unless @table_exists
|
@table_exists ||= {}
|
||||||
@table_exists
|
|
||||||
|
unless @table_exists[current_site]
|
||||||
|
@table_exists[current_site] = ActiveRecord::Base.connection.table_exists?(@model.table_name)
|
||||||
|
end
|
||||||
|
|
||||||
|
@table_exists[current_site]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue