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

    dazzling-lighter-36143

    05/25/2022, 1:09 PM
    Sweet, thanks for the advice @lemon-wall-20836 & @loud-jewelry-99127 ! I might look at contributing a method to make what i'm doing a little easier for future folks. Specifically something along the lines of this:
    Copy code
    ruby
    def referrer_record
        params = ::Avo::App.params
        # If the parameters are unavailable, we do not have the context to identify the record
        if !(params["via_relation_class"].present? && params["via_resource_id"].present?)
          return nil
        end
    
        resource_model = ::Avo::App.get_resource_by_model_name(params["via_relation_class"]).class
        return resource_model.find_scope.find(params["via_resource_id"])
    end
  • d

    dazzling-lighter-36143

    05/25/2022, 1:22 PM
    for now, for my testing I have it set as a helper within the app context so I can use it across any resource
  • n

    narrow-laptop-54609

    05/25/2022, 3:43 PM
    @lemon-wall-20836 I need your help again, I followed your advice for customizing Trix by creating a new custom field. The problem is that in order to customize it, I need to access Trix.config, which if I import it: import Trix from 'trix' I get the same error as before. "Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "trix-toolbar" has already been used with this registry"
    l
    • 2
    • 33
  • d

    dazzling-lighter-36143

    05/25/2022, 3:54 PM
    Is it intended that not-visible or read-only fields do not submit their value on save?
    l
    • 2
    • 47
  • l

    lemon-wall-20836

    05/25/2022, 3:58 PM
    custom trix field
  • d

    dazzling-lighter-36143

    05/26/2022, 1:02 AM
    Are there any thoughts about making has_many & similar association types more customizable? I'm thinking that since Avo has you explicitly list the association as a field, there may be an opportunity to customize how it's embedded on the
    :show
    views
    l
    • 2
    • 11
  • d

    dazzling-lighter-36143

    05/26/2022, 1:15 AM
    Also in slight news, It looks like I should be able to deprecate activeadmin in this project in the next few days in leu of Avo! 😄
  • l

    lemon-wall-20836

    05/26/2022, 7:49 AM
    Are there any thoughts about making has
  • n

    narrow-apple-95134

    06/06/2022, 9:37 PM
    Anyone dealt with needing a field to be dynamically required? For example, we have a "certifications" model where the expiration date requirement is set by a separate configuration object - is there a way to have Avo reference that config object when determining whether the field is required? (Can't see a way to do that at the moment...)
    l
    • 2
    • 2
  • l

    lemon-wall-20836

    06/07/2022, 7:34 AM
    Anyone dealt with needing a field to be
  • l

    loud-jewelry-99127

    06/07/2022, 11:54 AM
    Hello, is there a way to make auto-exclusive boolean filter? For example i have 2 options, on and off, i want to deselect on (if selected) when i press off and vice-versa
    l
    • 2
    • 8
  • l

    lemon-wall-20836

    06/07/2022, 12:18 PM
    auto-exclusive filters (reactive filters)
  • n

    narrow-laptop-54609

    06/09/2022, 6:19 PM
    Trying out the new Stimulus Integration on 2.8, everything is working great, except for the show view. I'm getting this error: "undefined method `get_stimulus_controllers' for nil:NilClass"
  • n

    narrow-laptop-54609

    06/09/2022, 6:19 PM
    I'm sure I'm missing something
  • l

    lemon-wall-20836

    06/09/2022, 6:21 PM
    hmm... it should work 🙂
  • l

    lemon-wall-20836

    06/09/2022, 6:21 PM
    I tested right now
  • l

    lemon-wall-20836

    06/09/2022, 6:21 PM
    just to cover all bases... have you restarted the rails server?
  • n

    narrow-laptop-54609

    06/09/2022, 6:21 PM
    Error output
    l
    • 2
    • 43
  • n

    narrow-laptop-54609

    06/09/2022, 6:21 PM
    <% content_classes = 'prose prose-sm' content_classes << ' hidden' unless @field.always_show %>
  • l

    lemon-wall-20836

    06/16/2022, 8:26 PM
    To fix this please follow this guide https://docs.avohq.io/2.0/upgrade.html#pass-the-resource-to-the-show-field-wrapper-in-custom-fields
  • d

    delightful-beach-23533

    06/16/2022, 8:28 PM
    just got it) yep read through the thread
  • d

    delightful-beach-23533

    06/16/2022, 8:28 PM
    have a quick question about something, is there a way to disable the "show" page for resource?
  • l

    lemon-wall-20836

    06/16/2022, 8:29 PM
    Hmmm, not yet
  • l

    lemon-wall-20836

    06/16/2022, 8:29 PM
    This is the first time this was requested
  • l

    lemon-wall-20836

    06/16/2022, 8:29 PM
    I could see this as being useful
  • l

    lemon-wall-20836

    06/16/2022, 8:30 PM
    I’m curious. Is there a special reason why you’d want to do that?
  • d

    delightful-beach-23533

    06/16/2022, 8:33 PM
    well just dont really need for blog posts, prefer just to go into the edit page, and have a preview button that will open the post in a new window on the actual website
  • d

    delightful-beach-23533

    06/16/2022, 8:33 PM
    not critical thing tho
  • l

    lemon-wall-20836

    06/16/2022, 8:33 PM
    Got it. Sounds good!
  • l

    lemon-wall-20836

    06/16/2022, 8:34 PM
    I’ll add it to the roadmap
1...394041...64Latest