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

    straight-mechanic-78430

    10/27/2022, 4:40 PM
    Hi is there any way to hook up in the Avo Actioncontroller ? we need to run them before actions run any idea ? thanks a lot
    l
    • 2
    • 6
  • r

    ripe-article-50191

    10/28/2022, 6:09 AM
    Hi, I have a problem, I have ejected one view to load custom content. I need to fire a load event with and without jquery, but the load event is not fired never I have try:
    document.addEventListener('DOMContentLoaded', (event) => {...})
    document.addEventListener('turbo:load', (event) => {...})
    $(document).on( 'turbo:load', function(event) {...})
    $(function(){...})
    I don't know if AVO gem environment needs another code to fire on load events Thanks in advance.
  • m

    mammoth-guitar-49791

    10/28/2022, 11:46 AM
    Is the attach_****? pundit policy working on associations? I'm adding it to my parent resource and somehow it's now applying to the has_many associations. It's still displaying the attach? button
    s
    l
    • 3
    • 14
  • s

    straight-mechanic-78430

    10/28/2022, 11:57 AM
    https://avodemo.herokuapp.com/avo/resources/posts
    l
    • 2
    • 3
  • s

    straight-mechanic-78430

    10/28/2022, 12:05 PM
    Is the attach pundit policy working on
  • m

    mammoth-guitar-49791

    10/28/2022, 12:48 PM
    I'm trying to install avo locally on my computer to figure out the issue above. I have launch docker-compose-up. and when I run bin/dev I receive the following issue.
    Copy code
    ❯ bin/dev
    system | Tmux socket name: overmind-avo-Fd5UUGjQpgdnKu-SsLXfB
    system | Tmux session ID: avo
    system | Listening at ./.overmind.sock
    css    | Started with pid 59971...
    cjs    | Started with pid 59972...
    web    | Started with pid 59969...
    js     | Started with pid 59970...
    yarn run v1.22.19
    $ esbuild app/javascript/*.js --bundle --sourcemap --outdir=app/assets/builds --watch
    yarn run v1.22.19
    yarn run v1.22.19
    $ tailwindcss -i ./app/assets/stylesheets/avo.base.css -o ./app/assets/builds/avo.base.css --postcss --watch
    $ esbuild spec/dummy/app/javascript/*.js --bundle --sourcemap --minify --outdir=app/assets/builds --watch
    cjs    | [watch] build finished, watching for changes...
    js     | [watch] build finished, watching for changes...
    css    |
    css    | Rebuilding...
    css    | Done in 1758ms.
    web    | => Booting Puma
    web    | => Rails 6.1.6.1 application starting in development
    web    | => Run `bin/rails server --help` for more startup options
    web    | Puma starting in single mode...
    web    | * Puma version: 5.6.4 (ruby 3.1.0-p0) ("Birdie's Version")
    web    | *  Min threads: 5
    web    | *  Max threads: 5
    web    | *  Environment: development
    web    | *          PID: 59973
    web    | * Listening on http://127.0.0.1:3030
    web    | * Listening on http://[::1]:3030
    web    | Use Ctrl-C to stop
    web    | Started GET "/" for 127.0.0.1 at 2022-10-28 14:45:14 +0200
    web    |
    web    | ActiveRecord::ConnectionNotEstablished (connection to server at "::1", port 5432 failed: Connection refused
    web    |     Is the server running on that host and accepting TCP/IP connections?
    web    | ):
    web    |
    web    | activerecord (6.1.6.1) lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client'
    '
  • l

    lemon-wall-20836

    10/28/2022, 3:23 PM
    httpsavodemo herokuapp
  • s

    strong-restaurant-36788

    11/01/2022, 1:18 AM
    Actions Broken? I've got a weird one. I've been using 2.15.1 for a while and have tried to upgrade off and on for a month +, but keep getting distracted. It's because stuck on "Actions" being broken for me. I tried again today and still stuck. I'm trying to get to 2.18.0 but no luck. Here is a video. Any ideas to investigate? Video walkthrough at https://missionmet-share.s3.amazonaws.com/ricky/Screen-Recording-2022-10-31-21-16-22#e3216aea647c5a640fa847c0b1f0230693d76f76afc5d7e527975f8d6a0607c4 Thanks so much!
    l
    • 2
    • 13
  • l

    lemon-wall-20836

    11/01/2022, 7:49 AM
    Screen-Recording-2022-10-31-21-16-22.mp4
  • d

    damp-truck-72770

    11/04/2022, 6:11 AM
    Hi, I just started using Avo and am very excited about it. Unfortunately I'm not using Devise (and want to avoid implementing it right now). Is there a way to easily use something like http basic auth (or github auth, etc) to quickly add a layer of authentication? I'm looking for a quick and dirty solution just to get a usable admin dash out there. Thanks!
    l
    • 2
    • 6
  • l

    lemon-wall-20836

    11/04/2022, 9:28 AM
    Hi I just started using Avo and am very
  • d

    damp-truck-72770

    11/05/2022, 12:34 AM
    Hi, I've deployed and gotten Avo working locally on my computer. However, when I deploy it I'm running into issues. I'm using a pro license and I've properly set the API key. However, I'm getting the following error. Has anyone else run into something like this while deploying to production?
    Copy code
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] ActionView::Template::Error (key must be 32 bytes):
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08]     1: <%= render Avo::TurboFrameWrapperComponent.new(params[:turbo_frame]) do %>
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08]     2:   <%= render Avo::Views::ResourceIndexComponent.new(
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08]     3:       resource: @resource,
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08]     4:       resources: @resources,
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08]     5:       models: @models,
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08]
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] activesupport (7.0.3.1) lib/active_support/message_encryptor.rb:172:in `key='
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] activesupport (7.0.3.1) lib/active_support/message_encryptor.rb:172:in `_encrypt'
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] activesupport (7.0.3.1) lib/active_support/message_encryptor.rb:154:in `encrypt_and_sign'
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] avo (2.18.1) lib/avo/services/encryption_service.rb:25:in `encrypt'
    Nov 4 05:26:23 PM  [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] avo (2.18.1) lib/avo/services/encryption_service.rb:10:in `encrypt'
    l
    • 2
    • 6
  • l

    lemon-wall-20836

    11/05/2022, 8:21 AM
    Encryption key
  • q

    quiet-winter-98496

    11/07/2022, 11:11 AM
    Does anyone know of a way to use association fields in an action? I'd like to use a has one or belongs to field, to allow the user to select a resource. Unfortunately when I use a belongs to I get an error (can't find that association because there is no model) and with has_one it doesn't error out but it doesn't show the field at all.
    l
    • 2
    • 9
  • l

    lemon-wall-20836

    11/07/2022, 12:06 PM
    belongs_to in actions
  • t

    thankful-stone-82785

    11/07/2022, 2:57 PM
    Is it possible to move the order of a resource tool or the associations on a resource page? F.e. I'd like to first show the tool, then one of the relations and then the form fields of the resource itself. Now it seems fields are first, relations are always at the bottom and the resource tools between that.
    l
    • 2
    • 24
  • l

    lemon-wall-20836

    11/07/2022, 3:34 PM
    Is it possible to move the order of a
  • r

    ripe-article-50191

    11/08/2022, 11:53 AM
    Is it possible to add columns in index views with custom links and custom icon? Is it possible to hide the view link in index list?
    l
    • 2
    • 3
  • m

    modern-ambulance-83380

    11/08/2022, 3:42 PM
    hi everybody - nice to see that this community is so active! 🙂 i have a (hopefully quick) question regarding the load-order of external scripts via the -tag. What i've done: - i want to integrate a google maps into avo via avo-tools following this guide here: https://betterprogramming.pub/integrate-google-maps-with-a-rails-app-5e5012e8cf16 - i've created a avo:tool via
    bin/rails g avo:tool map
    and my
    _head.html.erb
    looks like this:
    Copy code
    <%= javascript_importmap_tags "avo.custom" %>
    <script src="https://maps.googleapis.com/maps/api/js?key=<%= Rails.application.credentials[:google_maps_js_api_key] %>&callback=initMap" data-turbolinks-eval="false"></script>
    - then i've added the callback function
    initMap
    to
    avo.custom.js
    Expected result: - the callback function
    initMap
    should be triggered as soon as the google maps script is loaded Actual result: - a JS exception "initMap is not a function" is raised Assumption: - i assume, that the load-order is somehow messed. Question: - What do i need to do to get this fixed? Is this even the recommended way of loading external scripts in Rails 7? I've seen Chris Oliver from GoRails do it the same, but it still feels kind of strange. Unfortunately I am still a bit lost with importmaps etc. in Rails 7.
    l
    • 2
    • 7
  • l

    lemon-wall-20836

    11/08/2022, 4:02 PM
    Is it possible to add columns in index
  • l

    lemon-wall-20836

    11/08/2022, 4:03 PM
    hi everybody nice to see that this
  • r

    ripe-article-50191

    11/09/2022, 6:59 AM
    Problems with translations
  • r

    ripe-article-50191

    11/09/2022, 7:11 AM
    I am using rails location in mode
    domain.com/locale/resources/../..
    for english and spanish (
    /en/
    and
    /es/
    ) I have followed the docs instructions about how to configure .yml files. It appears to work but the problem is that independent if I put
    /en/
    or
    /es/
    always appears the spanish translations. Any idea?
    l
    • 2
    • 15
  • l

    lemon-wall-20836

    11/09/2022, 7:58 AM
    I am using rails location in mode
  • b

    bright-tomato-27372

    11/09/2022, 8:03 AM
    In case anyone is running into
    Zeitwerk::Error in Avo::StylesController#index
    and
    /YOUR_RAILS_PATH_HERE/app/avo/dashboards is not a directory
    , you just have to create an empty
    dashboards
    directory inside your
    avo
    directory. I was running 2.18.1 and updated to 2.19.0. I didn't have any dashboards so this directory was never created / needed. Hope this helps someone in case they find it here!
    l
    • 2
    • 5
  • s

    straight-mechanic-78430

    11/09/2022, 10:39 AM
    Hi avo people 🙂 Is there any way of manipulating tags in field tags ? we need to inject new tags / remove tags dynamically according to changes in the same resource. we can achieve the changes easily for a select box. But the field tag don't provide any API to do so ? and its using data attributes to hold the tags values. Attributes cant be manipulated with turbo stream . any idea? @lemon-wall-20836 any hint ? thanks a lot
    l
    • 2
    • 29
  • t

    thankful-stone-82785

    11/09/2022, 2:55 PM
    Wondering if there's a way for us to combine action buttons with a custom resource tool showing a form. Problem is the
    show_controls
    only works on
    Show
    pages but those do not have a
    form
    available to use 🤷‍♂️
    l
    • 2
    • 20
  • l

    lemon-wall-20836

    11/09/2022, 3:23 PM
    Wondering if there s a way for us to
  • l

    lemon-wall-20836

    11/09/2022, 3:26 PM
    tags field manipulation
  • g

    great-honey-61237

    11/09/2022, 3:29 PM
    Hey! Is it possible to have a select field within an
    Action
    which references the
    models
    that have been selected?
    l
    • 2
    • 5
1...495051...64Latest