Hey! Just a fast question, if i want to have insid...
# avo-2
k
Hey! Just a fast question, if i want to have inside a resource, inside tabs a has_many field duplicated, but with different scopes, just to separate the results, how can i do it? Becuse i have this:
Copy code
tabs do
    field :notes, as: :has_many, scope: -> do
      query.annotation
    end, name: 'Notas'
    field :notes, as: :has_many, scope: -> do
      query.annotation
    end, name: 'Observaciones'
  end
But the second field the scope doesnt work, i just a replica of the first has_many field
l
so the issue is that the tab name is the same?
Copy code
ruby
  tabs do
    tab 'Notas' do
      field :notes, as: :has_many, scope: -> do
        query.annotation
      end, name: 'Notas'
    end
    tab 'Observaciones' do
      field :notes, as: :has_many, scope: -> do
        query.annotation
      end, name: 'Observaciones'
    end
  end
try wrapping them again in a
tab
k
Well, at the moment i solved using custom relations with scopes in main model. But i will try that. Thanks!