Class: Wallaby::ActiveRecord::ModelDecorator::FieldsBuilder::AssociationBuilder
- Inherits:
-
Object
- Object
- Wallaby::ActiveRecord::ModelDecorator::FieldsBuilder::AssociationBuilder
- Defined in:
- lib/adapters/wallaby/active_record/model_decorator/fields_builder/association_builder.rb
Overview
To build the metadata for associations fields
Instance Method Summary collapse
-
#update(metadata, reflection) ⇒ Object
Update the metadata.
Instance Method Details
#update(metadata, reflection) ⇒ Object
Update the metadata
12 13 14 15 16 17 18 19 |
# File 'lib/adapters/wallaby/active_record/model_decorator/fields_builder/association_builder.rb', line 12 def update(, reflection) type = reflection.macro [:is_association] = true [:sort_disabled] = true [:is_through] = through?(reflection) [:has_scope] = scope?(reflection) [:foreign_key] = foreign_key_for(reflection, type) end |