Module: Mumukit::Platform::WebFramework::Rails
- Defined in:
- lib/mumukit/platform/web_framework.rb
Defined Under Namespace
Classes: LazyString
Class Method Summary collapse
- .configure_tenant_path_routes!(mapper, &block) ⇒ Object
- .lazy_string(&block) ⇒ Object
- .tenant_scope_options ⇒ Object
Class Method Details
.configure_tenant_path_routes!(mapper, &block) ⇒ Object
17 18 19 |
# File 'lib/mumukit/platform/web_framework.rb', line 17 def self.configure_tenant_path_routes!(mapper, &block) mapper.scope '/:tenant', , &block end |
.lazy_string(&block) ⇒ Object
13 14 15 |
# File 'lib/mumukit/platform/web_framework.rb', line 13 def self.lazy_string(&block) LazyString.new(proc(&block)) end |
.tenant_scope_options ⇒ Object
21 22 23 24 25 26 |
# File 'lib/mumukit/platform/web_framework.rb', line 21 def self. { defaults: { tenant: lazy_string { Mumukit::Platform.current_organization_name } }, constraints: { tenant: Mumukit::Platform::Organization.valid_name_regex } } end |