instance method
singleton_method_added
Ruby on Rails 8.0.4
Since v6.0.6 PrivateSignature
singleton_method_added(name)
No documentation comment.
Parameters
-
namereq
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
Defined in activerecord/lib/active_record/scoping/named.rb line 192
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Scoping::Named::ClassMethods