APIdock / Ruby on Rails
/
Browse About
method

association_foreign_key

v4.2.7 - Show latest stable - Class: ActiveRecord::Reflection::AssociationReflection
association_foreign_key()
public

No documentation available.

# File activerecord/lib/active_record/reflection.rb, line 333
      def association_foreign_key
        @association_foreign_key ||= options[:association_foreign_key] || class_name.foreign_key
      end

Related methods

  • Instance methods
  • active_record_primary_key
  • association_class
  • association_foreign_key
  • association_primary_key
  • association_scope_cache
  • belongs_to?
  • chain
  • check_eager_loadable!
  • check_preloadable!
  • check_validity!
  • collection?
  • compute_class
  • constructable?
  • counter_cache_column
  • foreign_key
  • has_inverse?
  • has_one?
  • join_id_for
  • join_table
  • klass
  • macro
  • nested?
  • polymorphic?
  • polymorphic_inverse_of
  • scope_chain
  • source_reflection
  • through_reflection
  • validate?
  • Class methods
  • new
  • Protected methods
  • protectedactual_source_reflection
  • Private methods
  • privateautomatic_inverse_of
  • privatecalculate_constructable
  • privatecan_find_inverse_of_automatically?
  • privatederive_class_name
  • privatederive_foreign_key
  • privatederive_join_table
  • privateinverse_name
  • privateprimary_key
  • privatevalid_inverse_reflection?
APIdock API Documentation Browser

© 2026 APIdock