instance method
attribute_method_matchers_matching
Ruby on Rails 6.0.6
Since v5.2.8.1 Last seen in v7.0.10 PrivateSignature
attribute_method_matchers_matching(method_name)
No documentation comment.
Parameters
-
method_namereq
Source
# File activemodel/lib/active_model/attribute_methods.rb, line 353
def attribute_method_matchers_matching(method_name)
attribute_method_matchers_cache.compute_if_absent(method_name) do
# Bump plain matcher to last place so that only methods that do not
# match any other pattern match the actual attribute name.
# This is currently only needed to support legacy usage.
matchers = attribute_method_matchers.partition(&:plain?).reverse.flatten(1)
matchers.map { |matcher| matcher.match(method_name) }.compact
end
end
Defined in activemodel/lib/active_model/attribute_methods.rb line 353
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::AttributeMethods::ClassMethods