Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
show all
- Extended by:
- ClassMethods
- Includes:
- InstanceMethods
- Defined in:
- lib/reactive_record/active_record/base.rb,
lib/reactive_record/active_record/aggregations.rb,
lib/reactive_record/active_record/associations.rb
Class Method Summary
collapse
_react_param_conversion, abstract_class=, abstract_class?, all, base_class, composed_of, find, find_by, inheritance_column, inheritance_column=, method_missing, model_name, primary_key, primary_key=, scope
#==, #attributes, #changed?, #destroy, #id, #id=, #initialize, #method_missing, #model_name, #primary_key, #revert, #save, #saving?
Class Method Details
.reflect_on_aggregation(attribute) ⇒ Object
9
10
11
|
# File 'lib/reactive_record/active_record/aggregations.rb', line 9
def self.reflect_on_aggregation(attribute)
reflect_on_all_aggregations.detect { |aggregation| aggregation.attribute == attribute }
end
|
.reflect_on_all_aggregations ⇒ Object
5
6
7
|
# File 'lib/reactive_record/active_record/aggregations.rb', line 5
def self.reflect_on_all_aggregations
base_class.instance_eval { @aggregations ||= [] }
end
|
.reflect_on_all_associations ⇒ Object
5
6
7
|
# File 'lib/reactive_record/active_record/associations.rb', line 5
def self.reflect_on_all_associations
base_class.instance_eval { @associations ||= superclass.instance_eval { (@associations && @associations.dup) || [] } }
end
|
.reflect_on_association(attribute) ⇒ Object
9
10
11
|
# File 'lib/reactive_record/active_record/associations.rb', line 9
def self.reflect_on_association(attribute)
reflect_on_all_associations.detect { |association| association.attribute == attribute }
end
|