Module: Roomer
- Defined in:
- lib/roomer.rb,
lib/roomer/tools.rb,
lib/roomer/rails.rb,
lib/roomer/version.rb,
lib/generators/setup/setup_generator.rb,
lib/generators/install/install_generator.rb
Defined Under Namespace
Modules: Generators, VERSION Classes: Engine, Tools
Constant Summary
- @@url_routing_strategy =
:domain
:global
- @@tenants_table =
:tenant
- @@tenant_url_identifier_column =
:url_identifier
- @@tenant_schema_name_column =
:schema_name
- @@schema_seperator =
'.'
File.join(migrations_directory,.to_s)
- @@tenanted_migrations_directory =
File.join(migrations_directory,tenants_table.to_s)
Class Method Summary (collapse)
-
+ (String) full_shared_shema_migration_path
Constructs the full path to the shared schema directory Example: /Users/Greg/Projects/roomer/db/migrate/global.
-
+ (String) full_tenants_table_name
Consutructs the full name for the tenants table with schema Example: ‘global.tenant’.
-
+ (String) migrations_directory
Rails DB Migrations Directory.
-
+ (Object) setup {|_self| ... }
Default way to setup Roomer.
Class Method Details
Constructs the full path to the shared schema directory Example: /Users/Greg/Projects/roomer/db/migrate/global
74 75 76 |
# File 'lib/roomer.rb', line 74 def self.full_shared_shema_migration_path "#{Rails.root}/#{shared_migrations_directory}" end |
+ (String) full_tenants_table_name
Consutructs the full name for the tenants table with schema Example: ‘global.tenant’
67 68 69 |
# File 'lib/roomer.rb', line 67 def self.full_tenants_table_name "#{shared_schema_name}#{schema_seperator}#{tenants_table}" end |
+ (String) migrations_directory
Rails DB Migrations Directory
52 53 54 |
# File 'lib/roomer.rb', line 52 def self.migrations_directory File.join("db","migrate") end |
+ (Object) setup {|_self| ... }
Default way to setup Roomer. Run rails generate roomer:install to create a fresh initializer with all configuration values.
86 87 88 |
# File 'lib/roomer.rb', line 86 def self.setup yield self end |