Class: WorkerPlugins::UserRelationshipPolymorphic

Inherits:
Object
  • Object
show all
Defined in:
app/services/worker_plugins/user_relationship_polymorphic.rb

Class Method Summary collapse

Class Method Details

.execute!Object



2
3
4
5
6
7
8
9
# File 'app/services/worker_plugins/user_relationship_polymorphic.rb', line 2

def self.execute!
  WorkerPlugins::Workplace.columns_hash.key?("user_type")
rescue StandardError => e
  # Fall back to true if we are in the middle of a migration or something
  return true if e.message.start_with?("Could not find table") || e.message.match(/Table '(.+)' doesn't exist/)

  raise e
end