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

    agreeable-action-34041

    08/17/2021, 5:51 AM
    Hello Everyone I have a question regarding the license. It was mentioned in the website that > License for one website with unlimited updates for the current version series. Can anyone please clarify a bit what it menas by "current version series" here? Does this mean one will need to renew the license when there will be a new version series like 2.00? Thank you.
  • l

    lemon-wall-20836

    08/17/2021, 9:13 AM
    Hi @User 👋
  • l

    lemon-wall-20836

    08/17/2021, 9:13 AM
    I can help with that
  • l

    lemon-wall-20836

    08/17/2021, 9:13 AM
    we have a higher order version number than stable
  • l

    lemon-wall-20836

    08/17/2021, 9:14 AM
    we're currentle on
    1.12.3
    series
    One
  • l

    lemon-wall-20836

    08/17/2021, 9:14 AM
    If we introduce a major breaking change we'll increment to
    2.0.0
    still with series version
    One
  • l

    lemon-wall-20836

    08/17/2021, 9:14 AM
    so the current license will still be applicable
  • l

    lemon-wall-20836

    08/17/2021, 9:15 AM
    If we in the future introduce a rewritten version with a whole lot more features we'll increment the series version to
    Two
    (or something else)
  • l

    lemon-wall-20836

    08/17/2021, 9:15 AM
    so that will become a separate product altogether
  • l

    lemon-wall-20836

    08/17/2021, 9:16 AM
    we don't have plans to do that in the near future so you should be good to go
  • l

    lemon-wall-20836

    08/17/2021, 9:16 AM
    Please let me know if this 👆 answers your question
  • a

    agreeable-action-34041

    08/17/2021, 9:57 AM
    Hi @lemon-wall-20836 . That clarifies the confusion. Thank you. 😊
  • l

    lemon-wall-20836

    08/17/2021, 9:57 AM
    Cool!
  • l

    lemon-wall-20836

    08/17/2021, 9:57 AM
    Let me know if I can help more
  • p

    plain-potato-84373

    08/18/2021, 2:14 PM
    hey there, is there a way to create a resource field that links to an arbitrary URL without creating a custom field? I tried
    as: :text, format_using: -> (value) { "<a href='#{value}'>link</a>" }
    but it gets inserted to the dom as text. i also tried
    as: :markdown, format_using: -> (v) { "[#{v}](#{v})" }
    but that gets escaped as well i worked around it by generating a custom "link_field" but this feels like a lot
  • l

    lemon-wall-20836

    08/18/2021, 2:15 PM
    Yes. You can use a computed field https://docs.avohq.io/1.0/field-options.html#computed-fields
    Copy code
    field :custom_link, as: :text do 
      LINK_HERE
    end
  • l

    lemon-wall-20836

    08/18/2021, 2:16 PM
    the value returned from that block will be passed to that field on that resource
  • p

    plain-potato-84373

    08/18/2021, 2:26 PM
    @User thanks for responding so quickly! i tried plugging a string link in to "LINK_HERE" but it is still being escaped in the rendered show view
    Copy code
    field :external_url, as: :text do
        "<a href='example.com'>example</a>"
      end
  • p

    plain-potato-84373

    08/18/2021, 2:27 PM
    i am on version 1.6.1
  • l

    lemon-wall-20836

    08/18/2021, 2:28 PM
    I believe you need to add
    .html_safe
    to the string
  • l

    lemon-wall-20836

    08/18/2021, 2:28 PM
    Copy code
    ruby
      field :external_url, as: :text do
        "<a href='example.com'>example</a>".html_safe
      end
  • p

    plain-potato-84373

    08/18/2021, 2:29 PM
    @User thank you! that worked 🙂
  • l

    lemon-wall-20836

    08/18/2021, 2:29 PM
    perfect
  • l

    lemon-wall-20836

    08/18/2021, 2:29 PM
    🙂
  • p

    plain-potato-84373

    08/18/2021, 3:31 PM
    is there any interest in a
    field :url
    ? that was the sort of thing i was expecting to find and right now i think it's not obvious to use the computed field as the primary way to create a field with a linked value
  • l

    lemon-wall-20836

    08/18/2021, 3:34 PM
    you could have a go at it
  • l

    lemon-wall-20836

    08/18/2021, 3:34 PM
    we might even put it in the repo
  • p

    plain-potato-84373

    08/18/2021, 3:36 PM
    ok awesome 🙂 thanks again!
  • d

    dry-evening-71367

    08/24/2021, 11:39 AM
    I'm trying to integrate pundit so I can provide a truly readonly admin view on a couple of ActiveRecord models that are connected. I've followed the instructions: * defined a policy called
    <ModelName>Policy
    * added
    include Pundit
    to the relevant
    Avo::Controller
    Avo appears to be ignoring my policy 🤷🏼‍♂️ - any ideas? Have a missed a step? Do I need to explicitly call
    authorize
    somewhere?
  • l

    lemon-wall-20836

    08/24/2021, 11:41 AM
    no you shouldn't need to do that
1...121314...64Latest