module Mumukit::Platform::WebFramework::Rails

Public Class Methods

configure_tenant_path_routes!(mapper, &block) click to toggle source
# File lib/mumukit/platform/web_framework.rb, line 17
def self.configure_tenant_path_routes!(mapper, &block)
  mapper.scope '/:tenant', tenant_scope_options, &block
end
lazy_string(&block) click to toggle source
# File lib/mumukit/platform/web_framework.rb, line 13
def self.lazy_string(&block)
  LazyString.new(proc(&block))
end
tenant_scope_options() click to toggle source
# File lib/mumukit/platform/web_framework.rb, line 21
def self.tenant_scope_options
  {
      defaults: { tenant: lazy_string { Mumukit::Platform.current_organization_name } },
      constraints: { tenant: Mumukit::Platform::Organization.valid_name_regex }
  }
end