module Mycrm::Domains
facades
Public Class Methods
const_missing(name)
click to toggle source
Uncomment this line to create categories as constants on load.
Mycrm.configuration
.domains.each { |key, items| create_constant
(key) }
Calls superclass method
# File lib/mycrm/domains.rb, line 47 def self.const_missing(name) return super unless Mycrm.configuration.domains.key?(name.to_underscore) create_constant(name) end
create_constant(name)
click to toggle source
# File lib/mycrm/domains.rb, line 52 def self.create_constant(name) domain = Mycrm::Domains.const_set(name.to_camelized, Module.new) domain.extend Mycrm::Domains::Rescuer end