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

    lemon-wall-20836

    02/18/2022, 8:54 AM
    https://docs.avohq.io/1.0/filters.html#registering-filters
  • c

    clean-salesmen-51708

    02/18/2022, 8:55 AM
    Right at the end! 🤦‍♂️
  • c

    clean-salesmen-51708

    02/18/2022, 8:55 AM
    Thanks for that.
  • l

    lemon-wall-20836

    02/18/2022, 8:56 AM
    that's good feedback for me to update the docs
  • l

    lemon-wall-20836

    02/18/2022, 8:56 AM
    thanks!
  • c

    clean-salesmen-51708

    02/18/2022, 8:57 AM
    Thanks, it works.
  • l

    lemon-wall-20836

    02/18/2022, 8:58 AM
    🎉
  • c

    clean-salesmen-51708

    02/21/2022, 4:47 PM
    How to stop the id from showing in the search dialog?
    Copy code
    class FtthSurveyResource < Avo::BaseResource
      self.title = :id
      self.includes = []
      self.search_query = ->(params:) do
        scope.ransack(first_name_i_cont: params[:q], last_name_i_cont: params[:q], m: "or").result(distinct: false)
      end
      self.search_query_help = "- search by first or last name"
      
      field :first_name, as: :text
      field :last_name, as: :text
      field :street_number, as: :text
      field :street_name, as: :text
      field :mobile_number, as: :text
      field :current_access_type, as: :text, hide_on: [:index]
      field :current_contract_term, as: :text, hide_on: [:index]
      field :contract_months_remaining, as: :text, hide_on: [:index]
      field :able_to_take_monthly_option, as: :text, hide_on: [:index]
      field :current_monthly_spend, as: :text, hide_on: [:index]
      field :current_isp, as: :text, hide_on: [:index]
      field :interested_in_market_related_fibre, as: :text, hide_on: [:index]
      field :objects_to_telkom_pole_use, as: :text, hide_on: [:index]
    end
  • l

    lemon-wall-20836

    02/21/2022, 5:00 PM
    you need to change the
    self.title
    attribute
  • l

    lemon-wall-20836

    02/21/2022, 5:00 PM
    https://docs.avohq.io/1.0/resources.html#setting-the-title-of-the-resource
  • l

    lemon-wall-20836

    02/21/2022, 5:00 PM
    and select a better field
  • l

    lemon-wall-20836

    02/21/2022, 5:01 PM
    you can even create a
    name
    attribute on your model and use that one
  • l

    lemon-wall-20836

    02/21/2022, 5:01 PM
    https://github.com/avo-hq/avodemo/blob/main/app/models/user.rb#L20 https://github.com/avo-hq/avodemo/blob/main/app/avo/resources/user_resource.rb#L2
  • c

    clean-salesmen-51708

    02/22/2022, 6:53 AM
    Ah! Thanks Adriaan.
  • t

    thankful-honey-17854

    02/22/2022, 4:57 PM
    Hi all, i'm valutate avo for new project. I think that's is the right choose. However my project require translation of active record datas. I have always used Globalize for this purpose and i'm wondering how can i integrate it with Avo. My idea would be that of show and edit "globalized fields" with current avo locale. Somebody have done this? Thank you.
  • l

    lemon-wall-20836

    02/22/2022, 5:55 PM
    Hey @User . Avo doesn't support localized records yet. It's something we'd like to add later this year. I'll have to look and see how globalize works. I'm not familiar with it. Is it ok if I ping you tomorrow after I play around a bit? I'd like to see how it can be integrated into Avo.
  • t

    thankful-honey-17854

    02/23/2022, 7:28 AM
    Ok. Thank you Adrian! I mentioned Globalize because is the gem that i know, but if there are others it's ok.
  • l

    lemon-wall-20836

    02/23/2022, 9:32 AM
    We recently added
    Impact
    and
    Urgency
    to our
    Bug report
    issue template to better evaluate the issues you send in. We're super open to feedback so let us know if this is a good idea or not 😅 https://github.com/avo-hq/avo/issues/new?assignees=&labels=&template=bug_report.md&title=
  • c

    clean-salesmen-51708

    02/23/2022, 1:44 PM
    Is it possible to make an associated column sortable? I have
    Copy code
    field :user, as: :belongs_to, sortable: true
    `
    and get the attached error when selecting the sort arrows for the user column.
  • l

    lemon-wall-20836

    02/23/2022, 1:45 PM
    hmm, the belongs_to is not sortable
  • l

    lemon-wall-20836

    02/23/2022, 1:46 PM
    it would have to do a more advanced query in the background
  • l

    lemon-wall-20836

    02/23/2022, 1:46 PM
    like get all the posts and all the users and sort the posts by some user property
  • c

    clean-salesmen-51708

    02/23/2022, 1:51 PM
    Ok, makes sense.
  • l

    lemon-wall-20836

    02/23/2022, 6:39 PM
    I'm making good progress on multilingual content with the
    mobility
    gem. Expect a guide in the next few days 💪
  • t

    thankful-honey-17854

    02/24/2022, 8:08 AM
    Hooo! Thank'you Adrian! Good!
  • l

    lemon-wall-20836

    02/24/2022, 7:28 PM
    Hey @User (and whoever is interested in multilingual content) We pushed some updates on version
    1.22.4
    that adds basic multilingual support. Basic is the main word here 😅. We plan on adding proper support in the future. Please go over this guide and add (basic) multilingual content support to Avo. https://docs.avohq.io/1.0/recipes/multilingual-content.html
  • t

    thankful-honey-17854

    02/25/2022, 7:31 AM
    @User thank you! I'll try new version soon. Thank's for the quickness.
  • h

    helpful-microphone-19711

    02/28/2022, 10:13 PM
    It looks like this PR has broken some of my existing has_many associations, but I can't quite nail down why: https://github.com/avo-hq/avo/pull/694
  • h

    helpful-microphone-19711

    02/28/2022, 10:16 PM
    It looks like the Avo demo app is running 1.22.0, but I wonder if all of its associations would work correctly if it were running 1.22.2 or later.
  • l

    lemon-wall-20836

    02/28/2022, 10:24 PM
    hey @User I updated avodemo
1...272829...64Latest