https://avo.cool logo
Hi everyone, I'm currently facing an issue when...
# fields
n
Hi everyone, I'm currently facing an issue when I try to add filterable: true to one of the fields I use. Here is the resource config(Look at the name field):
Copy code
class Avo::Resources::GamAccount < Avo::BaseResource
  self.title = :name
  self.includes = [:mcm, :currency]

  def fields
    field :id, as: :id
    field :name, as: :text, filterable: true
    field :network_code, as: :text, required: true
    field :account_type, as: :select, enum: GamAccount.account_types
    field :currency, as: :belongs_to, can_create: false
    field :mcm, as: :belongs_to, can_create: false
    field :status, as: :select, enum: GamAccount.statuses
    field :utm_campaign_key_id, as: :text
    field :channel_custom_dimension_key_id, as: :text
    field :blogs, as: :has_many, can_create: false
    field :gam_account_shares, as: :has_many
  end

  def actions
    action Avo::Actions::GamAccountImportKeyValueMetrics
  end
end
I do have ransackable_attributes defined on my model
Copy code
def self.ransackable_attributes(auth_object = nil)
    ["name"]
  end
But I'm getting the error
Copy code
undefined method 'avo_dynamic_filters' for an instance of #<Class:0x00007fbbb6bdad20>
m
Thread automatically created by Arthur in #fields
l
Hi @nice-ambulance-76519 thanks for reaching out
Probably you updated avo recently and didn't noticed a breaking change
Let me check the docs and send you a link with the relevant update
n
Thank you 👍
l
https://docs.avohq.io/3.0/upgrade.html#Avo's%20mounting%20point%20update
Let me know if the issue persists
n
That worked @loud-jewelry-99127
thanks
l
Anytime!