APIdock / Ruby on Rails
/
Browse About
method

active_record_primary_key

v6.1.3.1 - Show latest stable - Class: ActiveRecord::Reflection::AssociationReflection
active_record_primary_key()
public

No documentation available.

# File activerecord/lib/active_record/reflection.rb, line 454
      def active_record_primary_key
        @active_record_primary_key ||= -(options[:primary_key]&.to_s || primary_key(active_record))
      end

Related methods

  • Instance methods
  • active_record_primary_key
  • add_as_polymorphic_through
  • add_as_source
  • add_as_through
  • association_class
  • association_foreign_key
  • association_primary_key
  • association_scope_cache
  • belongs_to?
  • check_eager_loadable!
  • check_preloadable!
  • check_validity!
  • clear_association_scope_cache
  • collect_join_chain
  • collection?
  • compute_class
  • constructable?
  • extensions
  • foreign_key
  • has_inverse?
  • has_one?
  • has_scope?
  • join_foreign_key
  • join_id_for
  • join_primary_key
  • join_table
  • macro
  • nested?
  • polymorphic?
  • polymorphic_inverse_of
  • source_reflection
  • through_reflection
  • validate?
  • Class methods
  • new
  • Private methods
  • privateautomatic_inverse_of
  • privatecalculate_constructable
  • privatecan_find_inverse_of_automatically?
  • privatederive_class_name
  • privatederive_foreign_key
  • privatederive_join_table
  • privateinverse_name
  • privatevalid_inverse_reflection?
APIdock API Documentation Browser

© 2026 APIdock