Exclude versions table when loading models in Unicorn.

This commit is contained in:
Guo Xiang Tan 2017-10-12 17:14:36 +08:00
parent d2ac7a9476
commit 91dfe23d6f
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ before_fork do |server, worker|
I18n.t(:posts)
# load up all models and schema
(ActiveRecord::Base.connection.tables - %w[schema_migrations]).each do |table|
(ActiveRecord::Base.connection.tables - %w[schema_migrations versions]).each do |table|
table.classify.constantize.first rescue nil
end