Class: Ansr::DummyAssociations::DummyReflection
- Inherits:
-
ActiveRecord::Reflection::AggregateReflection
- Object
- ActiveRecord::Reflection::AggregateReflection
- Ansr::DummyAssociations::DummyReflection
show all
- Defined in:
- lib/ansr/dummy_associations.rb
Instance Method Summary
collapse
Constructor Details
#initialize(macro, name, scope, options, active_record) ⇒ DummyReflection
Returns a new instance of DummyReflection.
63
64
65
66
|
# File 'lib/ansr/dummy_associations.rb', line 63
def initialize(macro, name, scope, options, active_record)
super(macro, name, scope, options, active_record)
@symbol = name
end
|
Instance Method Details
#association_class ⇒ Object
81
82
83
|
# File 'lib/ansr/dummy_associations.rb', line 81
def association_class
DummyAssociation
end
|
#check_validity! ⇒ Object
85
86
87
|
# File 'lib/ansr/dummy_associations.rb', line 85
def check_validity!
true
end
|
#collection? ⇒ Boolean
75
76
77
|
# File 'lib/ansr/dummy_associations.rb', line 75
def collection?
[:has_one, :has_many, :has_and_belongs_to_many].include? macro
end
|
#foreign_key ⇒ Object
72
73
74
|
# File 'lib/ansr/dummy_associations.rb', line 72
def foreign_key
@symbol end
|
#polymorphic? ⇒ Boolean
68
69
70
|
# File 'lib/ansr/dummy_associations.rb', line 68
def polymorphic?
false
end
|
#validate? ⇒ Boolean
78
79
80
|
# File 'lib/ansr/dummy_associations.rb', line 78
def validate?
false
end
|