method

get

Importance_0
v3.2.1 - Show latest stable - 0 notes - Class: IdentityMap
get(klass, primary_key) public

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/identity_map.rb, line 77
      def get(klass, primary_key)
        record = repository[klass.symbolized_sti_name][primary_key]

        if record.is_a?(klass)
          ActiveSupport::Notifications.instrument("identity.active_record",
            :line => "From Identity Map (id: #{primary_key})",
            :name => "#{klass} Loaded",
            :connection_id => object_id)

          record
        else
          nil
        end
      end
Register or log in to add new notes.