lib/apartment.rb in apartment-2.1.0 vs lib/apartment.rb in apartment-2.2.0

- old
+ new

@@ -8,12 +8,12 @@ class << self extend Forwardable - ACCESSOR_METHODS = [:use_schemas, :use_sql, :seed_after_create, :prepend_environment, :append_environment, :with_multi_server_setup ] - WRITER_METHODS = [:tenant_names, :database_schema_file, :excluded_models, :default_schema, :persistent_schemas, :connection_class, :tld_length, :db_migrate_tenants, :seed_data_file, :parallel_migration_threads] + ACCESSOR_METHODS = [:use_schemas, :use_sql, :seed_after_create, :prepend_environment, :append_environment, :with_multi_server_setup] + WRITER_METHODS = [:tenant_names, :database_schema_file, :excluded_models, :default_schema, :persistent_schemas, :connection_class, :tld_length, :db_migrate_tenants, :seed_data_file, :parallel_migration_threads, :pg_excluded_names] attr_accessor(*ACCESSOR_METHODS) attr_writer(*WRITER_METHODS) def_delegators :connection_class, :connection, :connection_config, :establish_connection @@ -74,9 +74,13 @@ def seed_data_file return @seed_data_file if defined?(@seed_data_file) @seed_data_file = "#{Rails.root}/db/seeds.rb" + end + + def pg_excluded_names + @pg_excluded_names || [] end # Reset all the config for Apartment def reset (ACCESSOR_METHODS + WRITER_METHODS).each{|method| remove_instance_variable(:"@#{method}") if instance_variable_defined?(:"@#{method}") }