https://avo.cool logo
Join Discord
Powered by
# avo-2
  • c

    creamy-ghost-62907

    01/25/2023, 9:12 PM
    facepalms
  • c

    creamy-ghost-62907

    01/25/2023, 9:12 PM
    Thank you! You remain, as always, amazing!
  • c

    creamy-ghost-62907

    01/25/2023, 11:08 PM
    ArgumentError: Missing secret_key_base for 'prod' environment, set this string with bin/rails credentials:edit
    <-- So now I'm getting this in CI. And, it appears to be the case that Turbo-Rails wants some environment-specific config stuff at asset precompilation time. OOC, does anyone here happen to know of a good way to avoid the need for this or am I just gonna be stuck making some use of Rails' encrypted credential store for stuff like this?
    l
    l
    • 3
    • 18
  • c

    creamy-ghost-62907

    01/26/2023, 12:35 AM
    Ok. Misadventures notwithstanding, I've got an initial setup of Avo deployed to our staging environment and a demo Pro key established. Once I get the corporate card, we'll finally be a paying customer! Migrating to Avo is likely to be a months-long process of converting one resource at a time as time permits, but it'll be nice to finally be free of the cruft of ActiveAdmin.
  • r

    rhythmic-summer-83393

    01/26/2023, 1:14 AM
    @creamy-ghost-62907 Nice job on the migration, that must feel good to be done with it
  • c

    creamy-ghost-62907

    01/26/2023, 3:10 AM
    It's definitely nice to have something landed, even if there's still a long ways to go before it's done.
  • g

    great-optician-87198

    01/26/2023, 12:42 PM
    Hello some questions about namespace resources. I have models under a
    Dojos
    namespace
    Dojos::Level
    and
    Dojos::Step
    with a one to many relation ship (level has many steps) Initially I tried to create a
    avo/resource/dojos/level_resource.rb
    but read in the doc that name space are not supported yet for resources. So I have the following Avo resources
    Copy code
    class DojosLevelResource < Avo::BaseResource
      ...
      self.model_class = "::Dojos::Level"
      field :dojos_steps, as: :has_many, use_resource: "DojosStep"
      ...
    end
    and
    Copy code
    class DojosStepResource < Avo::BaseResource
      ...
      self.model_class = "::Dojos::Step"
      field :dojos_level, as: :belongs_to
      ...
    end
    When I try to create a new Step I have an error (screen capture). For belongs_to is there something similar to
    use_resource
    that I should use ?
    l
    • 2
    • 6
  • s

    swift-businessperson-84139

    01/31/2023, 3:13 AM
    Hi, based on avo documentation, adding a file field is as simple as
    has_one_attached :profile_image
    to your model and then
    field :profile_image, as: :file, accept: "image/*"
    in the resource. After following Rails steps (active storage, image processing) in the documentation, of course. I think I did all of that, and it's not working for me for some reason. Any advice? The exciting part is that I'm not getting any errors. I can see the show page does the right query but the edit page does not allow me to enter the image.
    l
    • 2
    • 6
  • m

    mammoth-guitar-49791

    01/31/2023, 1:58 PM
    Does anybody have Avo assets up and running using
    Vite
    and
    Propshaft
    ? I have an app currently running with this set up in order to get live reloading, but realized that all the avo assets are no longer working.
    l
    • 2
    • 11
  • s

    swift-businessperson-84139

    02/02/2023, 3:50 AM
    Hi. Is there a way of using
    time_zone_select
    in select fields? I'm trying to add a dropdown so the user can pick his timezone from UI. Something like
    field :time_zone, as: :time_zone_select
    would be nice.
    l
    • 2
    • 5
  • m

    millions-waiter-75292

    02/05/2023, 2:45 PM
    Hello y'all, maybe it's a total newbie question... but how can the default "scope" for a resource be changed, like in a multi tenancy setting. Where for example I want that things are created attached to a specific tenant. I figured out that I can override
    resolve_query_scope
    and
    resolve_find_scope
    etc. for fetching, but how could I ensure that a model is created with a default? Note that I'm just starting out here - and frankly, didn't start yet using Pundit, which could also solve this, but was wondering what the "low level" solution was. Thanks a lot!
    l
    o
    • 3
    • 20
  • n

    nutritious-table-76971

    02/06/2023, 1:36 PM
    Hi! Planning to expose JSON api anytime soon?
    l
    • 2
    • 7
  • q

    quaint-pencil-2979

    02/06/2023, 2:00 PM
    Hello guys!! I am having and authorization eror with Avo: I am using action-policy gem, and i get this error:
    Copy code
    ActionView::Template::Error (Invalid #<UserPolicy> constructor is called):
    i do not need this authorization: I my sidebar extra is there this code line, how i can get all resources without policy scopes?
    Copy code
    # _sidebar_extra.html.erb 
    items = Avo::App.resources_for_navigation(_current_user).each
    l
    • 2
    • 15
  • n

    narrow-laptop-54609

    02/06/2023, 8:31 PM
    Hello everyone! I hope someone can help with this issue. I have this field
    field :published_date, as: :date, required: true, sortable: true, picker_format: 'F d, Y', format: "DD", default: Date.current, placeholder: Date.current
    locally it shows the current date just fine, so today, Feb 6 2023, but on the production site, the date shown is Jan 31, 2023. I checked the server shows the same date. What's going on?
    l
    • 2
    • 7
  • n

    narrow-laptop-54609

    02/06/2023, 8:32 PM
    I'm running avo 2.15.3
  • n

    narrow-laptop-54609

    02/06/2023, 8:33 PM
    This happens on a new record. When you edit a record with a date it shows the correct date.
  • m

    melodic-toddler-97877

    02/10/2023, 5:50 PM
    Is there a way to specify a default value for a polymorphic belongs_to field? (both the record_type and record_id fields?)
    l
    • 2
    • 5
  • Hey I ve been getting this error and I
    l

    late-cartoon-17585

    02/10/2023, 9:23 PM
    Copy code
    class FactoryResource < Avo::BaseResource
      self.title = :name
      self.includes = []
      # self.search_query = -> do
      #   scope.ransack(id_eq: params[:q], m: "or", product_cont: params[:q], from_measure_unit_cont: params[:q], to_measure_unit_cont: params[:q]).result(distinct: false)
      # end
    
      field :id, as: :id
      field :internal_code, as: :text
      field :name, as: :text
    
      tabs do
        field :products, as: :has_many, through: :product_factory
      end
    end
    • 1
    • 10
  • l

    late-cartoon-17585

    02/11/2023, 12:05 AM
    why some of my relations break validation? the first one is belongs_to, and it works the second one is a has_many, through, does not work the third one is belongs_to, does not work as well
    l
    o
    • 3
    • 10
  • o

    orange-dusk-17335

    02/11/2023, 12:05 AM
    GG @late-cartoon-17585, you just advanced to level 1!
  • l

    late-cartoon-17585

    02/11/2023, 1:26 AM
    how can I localize the relations, they have custom names in this case
    Copy code
    has_many :from_product_conversions, class_name: "ProductConversion", foreign_key: :id_measure_unit_from
    has_many :to_product_conversions, class_name: "ProductConversion", foreign_key: :id_measure_unit_to
    Copy code
    tabs do
        field :from_product_conversions, as: :has_many, translation_key: 'avo.field_translations.from_product_conversions'
        field :to_product_conversions, as: :has_many, translation_key: 'avo.field_translations.to_product_conversions'
    end
    it only translated part of the text, as you can see in
    Conversรตes origem
    , but not the tab title
    l
    • 2
    • 124
  • l

    late-cartoon-17585

    02/11/2023, 1:29 PM
    is it possible to hide a menu section if no children are visible?
    l
    • 2
    • 10
  • l

    lemon-wall-20836

    02/13/2023, 1:36 PM
    Hey community! I'm asking for your help now ๐Ÿ˜… There's someone on Reddit that's asking if Avo is used by anyone and if the license is worth it. https://www.reddit.com/r/rails/comments/1116ua3/what_do_you_think_about_dashboard_libs_like_avo/
    l
    s
    • 3
    • 3
  • l

    lemon-wall-20836

    02/13/2023, 1:37 PM
    If you have a reddit account and would like to help with a comment on that post to tell them your experience, I would be extremely grateful ๐Ÿ™
  • s

    swift-businessperson-84139

    02/14/2023, 4:50 AM
    Hi, I'm trying to create a simple form to edit user attributes in an
    avo:tool
    but I'm not sure how to render the submit button (same look as in avo). Can anyone here point me in the right direction? I was looking at the documentation but couldn't find a full example.
    l
    • 2
    • 9
  • c

    curved-father-82134

    02/14/2023, 2:52 PM
    @here I'm new here! using
    Active storage
    gem. I have this`has_many_attached :attachments` in my model which is working fine. I'm using this
    field :attachments, as: :files, html: {edit:{....}}
    and
    self.includes = []
    I haven't included any assassination in
    includes array
    . In short all good here as well. but the issue that I'm facing which is about eager loading. Can anyone know about this issue how I can skip this eager loading. I would be very grateful if anyone could help.๐Ÿ™
    l
    • 2
    • 26
  • b

    billowy-easter-81499

    02/15/2023, 11:55 PM
    Hello, this is probably simple/silly, but I cannot seem to successfully run a custom action on a resource. I generated the following action via
    bin/rails generate avo:action reactivate_client
    Copy code
    class ReactivateClient < Avo::BaseAction
      self.name = "Reactivate client"
      # self.visible = -> { view == :show }
    
      def handle(**args)
        models, fields, current_user, resource = args.values_at(:models, :fields, :current_user, :resource)
    
        models.each do |model|
    
          succeed 'Done!'
          reload
        end
      end
    end
    I registered the action on the ClientResource where users will invoke it from. I am also using pundit and set act_on? to true. Do I need to register this action elsewhere? Perhaps I am not managing it in pundit correctly? Thanks!
    l
    • 2
    • 5
  • b

    boundless-artist-39401

    02/16/2023, 2:04 PM
    Hello here, just discovered avo which seems very promising, I am currently using administrate to deal with admin backoffice for my multitenant SaaS app. The app is multilingual and user have to select the language in which they want to edit records (using gem mobility to handle that part). Does avo handle multilingual records ? What is the current state of affairs on this ๐Ÿ™‚ ?
    l
    • 2
    • 15
  • s

    straight-pager-31449

    02/17/2023, 3:11 AM
    @curved-policeman-46381 @narrow-apple-95134 @helpful-microphone-19711 hi. I am currently considering using the best management screen tool Avo! I would like to change "Avo user" here to any display name. Is it possible to change the default display name here? https://github.com/avo-hq/avo/blob/b86e2bd1496ba53b243d8a6c3b3db9869cf0b967/app/components/avo/sidebar_profile_component.rb#L24
    l
    • 2
    • 9
  • c

    curved-father-82134

    02/17/2023, 1:19 PM
    Hey beautiful people, @lemon-wall-20836 I have this
    field :user, as: :belongs_to
    which shows all the ids. But i wanna show the
    first_name
    , name as text id as value. I would be very grateful if anyone could help.
    l
    • 2
    • 7
1...535455...64Latest