You're viewing Avo 3 docs — go to Avo 4

Skip to content

association

Since v3.6.2

The for_attribute option allows to specify the association used for a certain field. This option make possible to define same association with different scopes and different name several times on the same resource.

Usage ​

ruby
field :reviews,
  as: :

field :special_reviews,
  as: :,
  for_attribute: :reviews,
  scope: -> { query.special_reviews }