method

perform_fetch

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: TypeMap
perform_fetch(lookup_key, &block) protected

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/type/type_map.rb, line 43
        def perform_fetch(lookup_key, &block)
          matching_pair = @mapping.reverse_each.detect do |key, _|
            key === lookup_key
          end

          if matching_pair
            matching_pair.last.call(lookup_key)
          elsif @parent
            @parent.perform_fetch(lookup_key, &block)
          else
            yield lookup_key
          end
        end
Register or log in to add new notes.