APIdock / Ruby on Rails
/
Browse About
method

collection?

v4.2.1 - Show latest stable - Class: ActiveRecord::Reflection::AssociationReflection
collection?()
public

Returns whether or not this association reflection is for a collection association. Returns true if the macro is either has_many or has_and_belongs_to_many, false otherwise.

# File activerecord/lib/active_record/reflection.rb, line 414
      def collection?
        false
      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!
  • check_validity_of_inverse!
  • collection?
  • compute_class
  • constructable?
  • counter_cache_column
  • foreign_key
  • has_inverse?
  • has_one?
  • inverse_of
  • 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