method

singleton_method_added

Importance_0
v8.0.0 - Show latest stable - 0 notes - Class: ClassMethods
singleton_method_added(name) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/scoping/named.rb, line 192
          def singleton_method_added(name)
            super
            # Most Kernel extends are both singleton and instance methods so
            # respond_to is a fast check, but we don't want to define methods
            # only on the module (ex. Module#name)
            generate_relation_method(name) if Kernel.respond_to?(name) && (Kernel.method_defined?(name) || Kernel.private_method_defined?(name)) && !ActiveRecord::Relation.method_defined?(name)
          end
Register or log in to add new notes.