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

    delightful-beach-23533

    06/16/2022, 8:34 PM
    tho speaking on this, i can't work out a way to have custom button on a blog post, that will preview the page in a new window
  • d

    delightful-beach-23533

    06/16/2022, 8:34 PM
    want to just have a simple link that will do a target: "_blank" on a link based on the resource slug
  • l

    lemon-wall-20836

    06/16/2022, 8:38 PM
    You can’t yet add custom buttons. That’s on the roadmap too. You could add a text field that’s only displayed on the show view and add the link there
  • l

    lemon-wall-20836

    06/16/2022, 8:38 PM
    I see that as a useful scenario too
  • l

    lemon-wall-20836

    06/16/2022, 8:39 PM
    https://docs.avohq.io/2.0/faq.html#why-don-t-regular-url-helpers-work-as-expected
  • l

    lemon-wall-20836

    06/16/2022, 8:39 PM
    Here’s how it would look like in the config
  • d

    delightful-beach-23533

    06/16/2022, 8:45 PM
    ahh yep just a field will work, thanks mate. Keep up the great work. Great solution, going to buy pro license after the trial. Its great
  • l

    lemon-wall-20836

    06/16/2022, 8:46 PM
    thank you for the kind words
  • l

    lemon-wall-20836

    06/16/2022, 8:46 PM
    let me know if I can be of more help ✌️
  • l

    lemon-wall-20836

    06/16/2022, 8:46 PM
    Copy code
    ruby
    field :url, as: :text, only_on: :show do |model|
      view_context.link_to("Preview", main_app.post_path(model), target: :_blank)
    end
  • l

    lemon-wall-20836

    06/16/2022, 8:46 PM
    the preview field 👆
  • d

    delightful-beach-23533

    06/16/2022, 8:48 PM
    yep cool, just added, works good
  • l

    lemon-wall-20836

    06/16/2022, 8:52 PM
    https://github.com/avo-hq/avo/issues/967 https://github.com/avo-hq/avo/issues/968 💪
  • d

    dazzling-lighter-36143

    06/20/2022, 1:38 PM
    I found a curious issue, where a polymorphic belongs_to in Resource A is causing a failure in Resource B, when Resource B has_many Resource A. Specifically, the index view of Resource A when showing Resource B is throwing an error
    Copy code
    Showing /usr/local/bundle/gems/avo-2.7.0/app/views/avo/base/index.html.erb where line #2 raised:
    
    undefined method `foreign_key' for nil:NilClass
  • l

    lemon-wall-20836

    06/20/2022, 1:38 PM
    hey man
  • l

    lemon-wall-20836

    06/20/2022, 1:39 PM
    would you mind creating an issue on GitHub with that? https://avo.cool/new-issue
  • d

    dazzling-lighter-36143

    06/20/2022, 1:39 PM
    Sure!
  • l

    lemon-wall-20836

    06/20/2022, 1:39 PM
    it's easier to debug and respond there
  • d

    dazzling-lighter-36143

    06/20/2022, 1:39 PM
    2s 🙂
  • l

    lemon-wall-20836

    06/20/2022, 1:39 PM
    thank you! I appreciate it!
  • d

    dazzling-lighter-36143

    06/20/2022, 1:53 PM
    https://github.com/avo-hq/avo/issues/979 @lemon-wall-20836 🙂
  • d

    dazzling-lighter-36143

    06/20/2022, 7:06 PM
    @lemon-wall-20836 I'm going to put together a quick repro with https://github.com/avo-hq/avodemo on ^
  • d

    dazzling-lighter-36143

    06/20/2022, 7:06 PM
    That way it's a little more hands-on
  • l

    lemon-wall-20836

    06/20/2022, 7:06 PM
    yup
  • l

    lemon-wall-20836

    06/20/2022, 7:06 PM
    thank you
  • d

    dazzling-lighter-36143

    06/20/2022, 7:06 PM
    Np!
  • l

    lemon-wall-20836

    06/20/2022, 7:06 PM
    anything so I can reproduce. I really have to reproduce it so I can see the error
  • d

    dazzling-lighter-36143

    06/20/2022, 7:06 PM
    Yup, no worries at all
  • d

    dazzling-lighter-36143

    06/20/2022, 7:12 PM
    I need to finish up a PR before I can get you the repro. Not sure the ETA, but worst case i'll try to get you something this week 🙂
  • d

    dazzling-lighter-36143

    06/20/2022, 7:13 PM
    I might also contribute a dockerfile/docker-compose config to the demo repo while i'm at it 🙂
1...404142...64Latest