Skip to content

Commit

Permalink
Merge pull request #1139 from thebravoman/develop
Browse files Browse the repository at this point in the history
[Debug] Logging info that table does not exist for a model
  • Loading branch information
pat committed Jul 20, 2019
2 parents 9990fb7 + d78a22b commit e207394
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/thinking_sphinx/core/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ def document_id_for_key(key)
end

def interpret_definition!
return unless model.table_exists?
table_exists = model.table_exists?
unless table_exists
Rails.logger.info "No table exists for #{model}. Index can not be created"
return
end
return if @interpreted_definition

apply_defaults!
Expand Down

0 comments on commit e207394

Please sign in to comment.