Class: ActiveAny::AssociationRelation

Inherits:
Relation
  • Object
show all
Defined in:
lib/active_any/association_relation.rb

Constant Summary

Constants inherited from Relation

Relation::CLAUSE_METHODS, Relation::MULTI_VALUE_METHODS, Relation::SINGLE_VALUE_METHODS, Relation::VALUE_METHODS

Instance Attribute Summary

Attributes inherited from Relation

#klass, #loaded

Instance Method Summary collapse

Methods inherited from Relation

create, #eager_loading?, #initialize_copy, #inspect, #load, #loaded?, #merge, #merge!, #records, relation_class_for, #reset, #scoping, #to_a

Methods included from Relation::QueryMethods

#get_value, #group, #group!, #includes, #includes!, #limit, #limit!, #order, #order!, #reverse_order, #reverse_order!, #set_value, #take, #values, #where, #where!

Methods included from Relation::FinderMethods

#find_by, #first, #last

Constructor Details

#initialize(klass, association) ⇒ AssociationRelation

Returns a new instance of AssociationRelation.



5
6
7
8
# File 'lib/active_any/association_relation.rb', line 5

def initialize(klass, association)
  super(klass)
  @association = association
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
# File 'lib/active_any/association_relation.rb', line 14

def ==(other)
  other == records
end

#proxy_associationObject



10
11
12
# File 'lib/active_any/association_relation.rb', line 10

def proxy_association
  @association
end