lib/enumerated.rb
# This is required during testing; we have to clear all these values out once tables are truncated:
# TODO - this should also clear the Rails cache, using the cached_name_for method provided in core initializer.
This is required during testing; we have to clear all these values out once tables are truncated:
TODO - this should also clear the Rails cache, using the cached_name_for method provided in core initializer.
This is required during testing ; we have to clear all these values out once tables are truncated : TODO - this should also clear the Rails cache using the cached_name_for method provided in core initializer .
def clear_enumerated
      unless class_variables.empty? 
        enumerations.keys.each do |method_name|
          name = "@@#{method_name}".to_sym
          remove_class_variable(name) if class_variable_defined?(name)
        end
      end
    end
def clear_enumerated unless class_variables . empty? enumerations . keys . each do | method_name | name = "@@#{method_name}" . to_sym remove_class_variable ( name ) if class_variable_defined? ( name ) end end end
This is required during testing; we have to clear all these values out once tables are truncated:
TODO - this should also clear the Rails cache, using the cached_name_for method provided in core initializer.
This is required during testing ; we have to clear all these values out once tables are truncated : TODO - this should also clear the Rails cache using the cached_name_for method provided in core initializer .
# Nothing to clear; avoids some trouble in migrations and early operations.