module ActiveRecord::AttributeMethods::ClassMethods
def dangerous_class_method?(method_name)
A class method is 'dangerous' if it is already (re)defined by Active Record, but
def dangerous_class_method?(method_name) return true if RESTRICTED_CLASS_METHODS.include?(method_name.to_s) if Base.respond_to?(method_name, true) if Object.respond_to?(method_name, true) Base.method(method_name).owner != Object.method(method_name).owner else true end else false end end