https://avo.cool logo
Join Discord
Powered by
# avo-3
  • This is on Rails 8.0.1
    a

    able-engine-47078

    03/12/2025, 6:13 PM
    This is on Rails 8.0.1
    m
    • 2
    • 1
  • Anything changed in regards to `avo-dynamic_fil...
    b

    bright-engine-36940

    03/13/2025, 5:48 PM
    Anything changed in regards to
    avo-dynamic_filters
    ? Getting an error below after upgrading from
    3.15.7
    to
    3.18.1
    .
    Copy code
    NoMethodError: undefined method 'avo_dynamic_filters' for an instance of #<Class:0x000074da5d500a08> (NoMethodError)
    
    helpers.avo_dynamic_filters.fields_path(
    m
    l
    • 3
    • 5
  • Hi @Paul Bob Sorry to bother you when you're bu...
    s

    straight-pager-31449

    03/31/2025, 1:06 PM
    Hi @loud-jewelry-99127 Sorry to bother you when you're busy. I have a quick question about the Scope feature. Is there a way to specify something like a name or arguments when calling it, similar to how we can with the Card feature?
    Copy code
    def scopes
        scope Avo::Scopes::MyCommonScope, name: 'common_foo', arguments: { custom_type: 'foobar' }
        ...
    m
    l
    • 3
    • 15
  • Is there a way to specify the scope of a belong...
    p

    purple-house-92941

    04/01/2025, 10:01 PM
    Is there a way to specify the scope of a belongs_to field on a resource such that the attach_scope query could reference the value of another field in the form? In other words, as the user is filling out a form to create a new resource, selecting an item from a certain belongs_to field would affect the options available in another belongs_to field.
    m
    l
    • 3
    • 4
  • Hi @Adrian M @Paul Bob, it's been a while! We h...
    b

    brainy-electrician-9993

    04/11/2025, 4:52 PM
    Hi @User @User, it's been a while! We had some changes in my company and I don't get to work with Avo as much 😦 I'm trying to customize the
    actions_list
    in the row control, but I'm encountering an interesting problem. When I set
    style: :icon
    the button doesn't show up on the frontend, even though it exists. Everything works normally when
    style
    is outline.
    m
    l
    • 3
    • 27
  • Hi guys, is there a way to have rounded image (...
    f

    future-author-97799

    04/12/2025, 11:18 AM
    Hi guys, is there a way to have rounded image (like gravatar) for :file ? https://cdn.discordapp.com/attachments/1138182212655788054/1360574777311498320/Screenshot_2025-04-12_at_15.17.35.png?ex=67fb9d81&is=67fa4c01&hm=b8155f85169e1789e15c4b51a40d7dbd0ffb32e6aeb983a01e7230245b61d545&
    m
    f
    l
    • 4
    • 14
  • Hi Avo! I'm trying to bring back a project I wa...
    s

    swift-businessperson-84139

    04/16/2025, 2:09 AM
    Hi Avo! I'm trying to bring back a project I was working on sometime ago. I'm able to install avo-advanced gems on my local but not with kamal config. Can you point me on the right direction?
    Copy code
    20.08 Retrying download gem from https://packager.dev/avo-hq/ due to error (2/4): Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://packager.dev/avo-hq/gems/avo-dynamic_filters-3.14.3.gem)
    m
    f
    l
    • 4
    • 9
  • ok, maybe this is a stupid question, and I'm no...
    a

    acceptable-cartoon-88076

    04/16/2025, 5:19 PM
    ok, maybe this is a stupid question, and I'm not really sure where this broken because I SWEAR I had this working once before, but where do I put my custom logo files so that they are properly rendered? Right now it just 404s no matter what I give it (at least in development it does)
    m
    l
    • 3
    • 8
  • Hi Paul Bob! Sorry to bother you when you’re bu...
    m

    miniature-optician-85831

    04/20/2025, 5:32 AM
    Thread automatically created by yuki in #1138182212655788054
  • With custom actions, what's the right way to ma...
    b

    better-restaurant-41251

    04/22/2025, 9:20 PM
    With custom actions, what's the right way to make a particular action contingent on the value in the record's field? For example, if I have "Activate" and "Deactivate" actions for users, I only want "Activate" to be visible on users with a
    status
    of "Inactive" and "Deactivate" to be visible on users with a
    status
    of "Active".
    m
    f
    l
    • 4
    • 8
  • Hey, I remember once there was a screenshot fro...
    a

    aloof-zebra-84085

    04/25/2025, 6:43 AM
    Hey, I remember once there was a screenshot from Adrian of some sort of a calendar view in Avo, a feature planned to be released. Was it actually implemented and released? No documentation about it, so probably was rejected or postponed?
    m
    l
    • 3
    • 8
  • Hi @Adrian M and @Paul Bob I am trying to add ...
    f

    flat-country-54330

    04/30/2025, 7:42 AM
    Hi @lemon-wall-20836 and @loud-jewelry-99127 I am trying to add logo to app but it is too small. What should be the ratio of the logo?
    m
    l
    • 3
    • 4
  • https://docs.avohq.io/3.0/guides/multi-language...
    w

    wooden-musician-16187

    05/08/2025, 10:19 AM
    https://docs.avohq.io/3.0/guides/multi-language-urls.html Do the Multi-language URLs work? I tried it but it doesn't work for me.
    m
    l
    • 3
    • 8
  • HI Avo Team :avo: I'm running into an interest...
    b

    brainy-electrician-9993

    05/13/2025, 8:26 PM
    HI Avo Team I'm running into an interesting edge case with actions in custom controls. When I have an action in an
    index_control
    and click on it with
    x
    number of records selected, the
    query
    variable is
    []
    when accessed from
    self.message
    . But it's populated when accessed from
    def handle
    . The interesting part is that this doesn't happen when the action is called from the dropdown action button (
    def action
    ) After some investigation, I found out that
    query
    is being set by the method
    set_query
    and
    find_records_from_resource_ids
    from
    actions_controller.rb
    . But I can't run many tests because custom controls are in the Avo Advanced repo Any thoughts?
    m
    l
    • 3
    • 61
  • here's a small conundrum I'm facing at the mome...
    m

    millions-exabyte-27721

    05/21/2025, 7:54 AM
    here's a small conundrum I'm facing at the moment: My app is a multitenant app using ActsAsTenant, I more or less followed this guide: https://docs.avohq.io/3.0/guides/acts_as_tenant_integration.html my issue is around authentication and order of callbacks. I want tenant admins to be able to access avo. since this is going to support domain based tenancy, my
    Multitenancy
    concern looks like this:
    Copy code
    rb
    module Multitenancy
      extend ActiveSupport::Concern
    
      included do |base|
        # apparently this is needed for forgery protection to work
        if base < ActionController::Metal
          set_current_tenant_through_filter
          before_action :set_request_details
        end
      end
    
      def set_request_details
        Avo::Current.tenant = current_account
        # etc...
      end
    the problem is I cannot use prepend_before_action because for some reason this will break CSRF. so in Avo's
    authenticate_with
    block
    Avo::Current.tenant
    is still empty. Thus I cannot filter tenant admins based on the currently set tenant. TL;DR I wonder if the best course of action is to monkey patch Avo's
    BaseApplicationController
    by appending my own
    before_action
    after
    set_request_details
    has run? šŸ¤”
    m
    f
    l
    • 4
    • 6
  • Hey Team! Does Record Previews also work for as...
    b

    brainy-electrician-9993

    05/21/2025, 6:45 PM
    Hey Team! Does Record Previews also work for association fields? Like we could preview the association resource from the show or index page
    m
    l
    • 3
    • 13
  • Hello in a select field is there a way to displ...
    g

    great-optician-87198

    05/26/2025, 12:38 PM
    Hello in a select field is there a way to display grouped options?
    m
    l
    • 3
    • 10
  • I've got a bit of a high-level question regardi...
    m

    millions-exabyte-27721

    06/04/2025, 8:28 AM
    I've got a bit of a high-level question regarding the mangement of many-to-many associations. In my application I have several models that have such a relation to the
    users
    table, for example
    Event
    ,
    Mailing
    etc. How do I attach users to such a model? Obviously I create a new
    Mailing
    , then do
    attach addressee
    . However, now I have to add them manually one by one, which isn't feasible. So the next thing I did was create a a few filters and an Avo action ("create Mailing with filtered users") for the
    User
    resource. I filter them down, then call the action to attach it to a
    Mailing
    , for example. The problem is that for the end user, this is a bit counterintuitive. Optimally, I'd show the users table in the `Mailing`'s edit view inline, do the filtering and attaching there. So largely a UX thing but I encountered it a couple of times now so that I thought it'd be worth asking
    m
    l
    • 3
    • 5
  • Hi guys, any idea why I got some unpermitted pa...
    f

    future-author-97799

    06/09/2025, 11:49 AM
    Hi guys, any idea why I got some unpermitted parameter` :turbo_frame` for some dynamic filtering:
    Copy code
    web      | Processing by Avo::DynamicFilters::FieldsController#create as TURBO_STREAM
    web      |   Parameters: {"filter_param_id" => "supplier_name", "resource_class" => "Avo::Resources::ExpenseLite", "turbo_frame" => "avo_filters_holder_ca8c4dc6", "via_record_id" => "184dd291-745e-4396-becc-0c760a8d22d4", "via_resource_class" => "Avo::Resources::Deal"}
    web      | Unpermitted parameter: :turbo_frame. Context: { controller: Avo::DynamicFilters::FieldsController, action: create, request: #<ActionDispatch::Request:0x00000001422b0d20>, params: {"filter_param_id" => "supplier_name", "resource_class" => "Avo::Resources::ExpenseLite", "turbo_frame" => "avo_filters_holder_ca8c4dc6", "via_record_id" => "184dd291-745e-4396-becc-0c760a8d22d4", "via_resource_class" => "Avo::Resources::Deal", "controller" => "avo/dynamic_filters/fields", "action" => "create"} }
    m
    l
    l
    • 4
    • 16
  • Hey guys, Couple of issues here: I have this ...
    p

    purple-park-97233

    06/14/2025, 4:58 PM
    Hey guys, Couple of issues here: I have this field on a resource: field :company, as: :belongs_to, sortable: true, searchable: true, html: { edit: { input: { data: { companyable_resource_target: "companyFieldInput", # Make the input a target action: "input->companyable-resource#onCompanyChange" # Add an action on change } } } } I have a stimulus controller set up and when I change the company, it seems like the onCompanyChange action is fired twice. Once with the old selection, and again with the new selection. It also looks like the target has registered itself on both inputs so they have the same name. Check the blue highlight in the screenshot. It's also returning the value in red, and I need the value in yellow. https://cdn.discordapp.com/attachments/1138182212655788054/1383490791418237048/Screenshot_2025-06-14_at_17.52.27.png?ex=684efbb4&is=684daa34&hm=2fb8e5fc75902d9dc892352f7bb9e7e3ed5d3fbd77068e45b2923ca0f21c3eb9& https://cdn.discordapp.com/attachments/1138182212655788054/1383490791787331605/Screenshot_2025-06-14_at_17.55.39.png?ex=684efbb4&is=684daa34&hm=f382aacd022d5a101aa2c86e3998a7a11f0f78c99ddbfd874086ee917e121367&
    m
    l
    • 3
    • 4
  • Hey guys, I hope yall had a great weekend I ha...
    b

    brainy-electrician-9993

    06/16/2025, 6:13 PM
    Hey guys, I hope yall had a great weekend I have an STI model
    Model
    that has many types (e.g.
    A
    ), so the class name ends up being
    Model::A
    . I have an AVO resource for
    Model
    that has a
    belongs_to
    association with a
    field
    , with
    searchable: true
    . The problem is that when we go to edit the value for this field, we have an error because
    via_reflection_class
    is
    Model::A
    instead of
    Model
    , and AVO cant find any resource named
    Model::A
    I checked the code and the problem seems to be happening in
    parent_resource
    , which returns
    nil
    . When we try to
    get_resource_by_model_class
    , since
    Model::A
    isn't a valid resource, it can't find it. But because it inherits
    Model
    I would expect it to return that resource if it can't find one for the child One workaround is to create resources for each type, but I was looking for a better solution Thoughts? https://cdn.discordapp.com/attachments/1138182212655788054/1384234382130155641/image.png?ex=6851b03a&is=68505eba&hm=ae07e31195f74ca6b257b0acbe0d4a22b8874eae959a929968d0f829040695fc&
    m
    l
    • 3
    • 24
  • Hi guys, Question on exception surfacing in Se...
    f

    fresh-thailand-89388

    06/17/2025, 10:10 AM
    Hi guys, Question on exception surfacing in Sentry - we don't get any exceptions from Avo into Sentry in production. Are they somehow rescued, and handled? Do you know?
    m
    l
    • 3
    • 13
  • Hello, I'm in the process of moving an app from...
    f

    few-beach-66118

    06/18/2025, 2:19 PM
    Hello, I'm in the process of moving an app from Active Admin to Avo. So far it's mostly going very well, and I'm getting through huge chunks of work quickly. Occassiaonlly, though, I'll try something and it doesn't cause any errors, but it also doesn't do anything. For example, I'm going back through and starting to add filters, but adding
    filterable: true
    (e.g.,
    field :email, as: :text, sortable: true, protocol: :mailto, filterable: true
    ) seems to have no effect. Based on the docs that's all it should take (email was already ransackable). But I don't get a filter button or bar or anything on the index page. I'm not sure how to start debugging in these cases. Any thoughts?
    m
    l
    l
    • 4
    • 33
  • Is there a simple way to remove the +Create but...
    l

    limited-kangaroo-75750

    06/18/2025, 8:26 PM
    Is there a simple way to remove the +Create button from the index view of a resource? Seems like
    self.index_controls
    is what I want to be using, but I can't seem to figure it out.
    m
    l
    • 3
    • 4
  • Let's say I have a `User` model, and I want the...
    f

    few-beach-66118

    06/18/2025, 9:04 PM
    Let's say I have a
    User
    model, and I want the fields on the users Index page, and the user fields shown as part of
    field :users, as: :has_many
    on
    Group
    Show page to be completely different. Is the best option to create a new resource, like
    GroupUser
    with
    self.model_class = "User"
    , and define a different set of fields on that, and then use
    field :group_users, as: :has_many
    as a field on
    Group
    ?
    m
    l
    • 3
    • 5
  • I just hit the "PDF previews broken in ActionTe...
    m

    millions-exabyte-27721

    06/25/2025, 12:17 PM
    I just hit the "PDF previews broken in ActionText" issue - https://github.com/avo-hq/avo/issues/2715 just for the record, it doesn't look like Trix is actually using the _blob.html.erb provided by the ActionText installer?
    m
    l
    • 3
    • 6
  • Avo 4 is really shaping up and looking awesome!...
    p

    purple-park-97233

    07/01/2025, 8:50 PM
    Avo 4 is really shaping up and looking awesome! Excited for the settings pages and reactive fields and I’m understanding now what you meant about and API endpoint feature. That’s very cool!
    m
    l
    • 3
    • 3
  • When using a date (or date_time) field with the...
    s

    sparse-holiday-3712

    07/07/2025, 8:24 PM
    When using a date (or date_time) field with the
    allowInput
    picker_option
    set to true, I'm seeing that pasting a text date into the flatpickr input isn't registering the value. While the pasted value shows up in the DOM, the corresponding form value does not update. It looks like there are two inputs, a real one and a fake one, the fake one seems to be hooked up to the picker widget and when you update the widget, it copies the value over to the other input, but it doesn't go the other way.
    m
    l
    • 3
    • 4
  • Is there a way to disable friendly_id integrati...
    c

    colossal-ambulance-71638

    07/11/2025, 4:53 PM
    Is there a way to disable friendly_id integration in admin panel and make avo always use actual record ids? I have this right now but the problem is when
    slug
    changes then redirect after edit leads to 404 page:
    Copy code
    self.find_record_method = lambda {
        if id.is_a?(Array)
          query.where(slug: id)
        else
          query.friendly.find(id)
        end
      }
    m
    l
    • 3
    • 15
  • hover
    m

    miniature-optician-85831

    07/22/2025, 1:40 PM
    Thread automatically created by john.troy in #1138182212655788054