Class: FlexibleFilter::Reflection::BelongsTo
- Inherits:
-
Object
- Object
- FlexibleFilter::Reflection::BelongsTo
- Defined in:
- lib/flexible_filter/reflection/belongs_to.rb
Instance Attribute Summary collapse
-
#reflection ⇒ Object
readonly
Returns the value of attribute reflection.
Instance Method Summary collapse
- #foreign_table ⇒ Object
-
#initialize(reflection) ⇒ BelongsTo
constructor
A new instance of BelongsTo.
- #primary_table ⇒ Object
Constructor Details
#initialize(reflection) ⇒ BelongsTo
4 5 6 |
# File 'lib/flexible_filter/reflection/belongs_to.rb', line 4 def initialize(reflection) @reflection = reflection end |
Instance Attribute Details
#reflection ⇒ Object (readonly)
Returns the value of attribute reflection.
2 3 4 |
# File 'lib/flexible_filter/reflection/belongs_to.rb', line 2 def reflection @reflection end |
Instance Method Details
#foreign_table ⇒ Object
14 15 16 |
# File 'lib/flexible_filter/reflection/belongs_to.rb', line 14 def foreign_table reflection.active_record.arel_table end |
#primary_table ⇒ Object
10 11 12 |
# File 'lib/flexible_filter/reflection/belongs_to.rb', line 10 def primary_table reflection.klass.arel_table end |