Class: Innkeeper::Resolvers::Schema

Inherits:
Abstract
  • Object
show all
Defined in:
lib/innkeeper/resolvers/schema.rb

Instance Attribute Summary

Attributes inherited from Abstract

#init_config

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

This class inherits a constructor from Innkeeper::Resolvers::Abstract

Instance Method Details

#resolve(tenant) ⇒ Object



6
7
8
9
10
11
# File 'lib/innkeeper/resolvers/schema.rb', line 6

def resolve(tenant)
  schemas = [tenant, Innkeeper.persistent_schemas].flatten
  search_path = schemas.map(&:inspect).join(", ")

  init_config.dup.tap{ |c| c[:schema_search_path] = search_path }
end