module Unidom::Common

Constants

CLOSED_AT
FROM_DATE
MAXIMUM_AMOUNT
NULL_UUID
OPENED_AT
SELF
STATE
THRU_DATE
VERSION

Public Class Methods

configure() { |options| ... } click to toggle source

Unidom 的各个模块进行配置。如: Unidom::Common.configure do |options|

# neglected_namespaces 列出的命名空间对应的 migration 不会被执行, model 也不会被加载。
# 但 concern 、 validator 、 type 、 helper 、 controller 、 view 等都可以正常使用。
options[:neglected_namespaces] = %w{
  Unidom::Action
}

end

# File lib/unidom/common.rb, line 35
def self.configure

  options = {}
  yield options

  default_options = {
    neglected_namespaces: []
  }
  self.options = default_options.merge options

  puts 'Unidom::Common:'
  if self.options[:neglected_namespaces].present?
    puts '-- neglected_namespaces'
    puts "   -> #{self.options[:neglected_namespaces].join ', '}"
  end

end