method

attribute_method_matchers_matching

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: ActiveModel::AttributeMethods::ClassMethods
attribute_method_matchers_matching(method_name) private

No documentation

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

Hide 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
Register or log in to add new notes.