lib/intercom/utils.rb in intercom-2.0.3 vs lib/intercom/utils.rb in intercom-2.1.0
- old
+ new
@@ -18,17 +18,17 @@
Utils.pluralize(resource_class_to_singular_name(resource_class))
end
def constantize_resource_name(resource_name)
class_name = Utils.singularize(resource_name.capitalize)
- define_lightweight_class(class_name) unless Intercom.const_defined?(class_name)
+ define_lightweight_class(class_name) unless Intercom.const_defined?(class_name, false)
namespaced_class_name = "Intercom::#{class_name}"
Object.const_get(namespaced_class_name)
end
def constantize_singular_resource_name(resource_name)
class_name = resource_name.split('_').map(&:capitalize).join
- define_lightweight_class(class_name) unless Intercom.const_defined?(class_name)
+ define_lightweight_class(class_name) unless Intercom.const_defined?(class_name, false)
namespaced_class_name = "Intercom::#{class_name}"
Object.const_get(namespaced_class_name )
end
def define_lightweight_class(class_name)