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

    some-army-14041

    12/13/2021, 1:59 PM
    Alright 👍
  • s

    some-army-14041

    12/13/2021, 2:07 PM
    Three other questions: 1. Is there a way to show a "spinner" on buttons if you create some records? If action takes some times it will lead the user to click multiple times on the button. 2. Is there a way to hide some actions for a ressource? (e.g. if it does not make sense to create a ressource, we should be able hide the "create" button) 3. Is there a way to show a description text below the ressource title (kind of a description of what the ressource is about, e.g. to explain the custom actions). We could make PRs for all three if it makes sense to you...
  • l

    lemon-wall-20836

    12/13/2021, 2:09 PM
    1. no. not a bad idea.
  • l

    lemon-wall-20836

    12/13/2021, 2:09 PM
    3. no. but that's a very good idea. maybe a
    self.description = "Some description"
    on the resource (or open to other good ideas)
  • l

    lemon-wall-20836

    12/13/2021, 2:10 PM
    for 2. you may use the authorization feature
  • l

    lemon-wall-20836

    12/13/2021, 2:10 PM
    https://docs.avohq.io/1.0/authorization.html#policies
  • l

    lemon-wall-20836

    12/13/2021, 2:10 PM
    you can hide the create buttons for certain types of users
  • c

    clean-salesmen-51708

    01/16/2022, 11:34 AM
    Heya, any idea why I'm not see the pagination buttons and
    per_page
    only shows 10 records?
  • l

    lemon-wall-20836

    01/16/2022, 11:57 AM
    Hmm
  • l

    lemon-wall-20836

    01/16/2022, 11:58 AM
    Are you sure there are more than 10 records?
  • l

    lemon-wall-20836

    01/16/2022, 11:58 AM
    The pagination should be there
  • l

    lemon-wall-20836

    01/16/2022, 11:58 AM
    What database are you using?
  • l

    lemon-wall-20836

    01/16/2022, 12:07 PM
    if you have just one page, the pagination is hidden
  • l

    lemon-wall-20836

    01/16/2022, 12:07 PM
    you have 10 records and set to display 24 per page. hence one page an no pagination displayed 🙂
  • c

    clean-salesmen-51708

    01/16/2022, 12:09 PM
    🙈 user error!
  • l

    lemon-wall-20836

    01/16/2022, 12:09 PM
    no problem!
  • c

    clean-salesmen-51708

    01/16/2022, 12:10 PM
    Forgot to change my seeds back to 1000 users.
  • c

    clean-salesmen-51708

    01/16/2022, 12:10 PM
    Also what the Avo way to order by first name?
  • l

    lemon-wall-20836

    01/16/2022, 12:11 PM
    by default, you mean?
  • c

    clean-salesmen-51708

    01/16/2022, 12:11 PM
    I know I can set a
    default_scope
    in the model but not keen
  • c

    clean-salesmen-51708

    01/16/2022, 12:12 PM
    So upon loading the users it should list alphabetically by first name.
  • c

    clean-salesmen-51708

    01/16/2022, 12:12 PM
    It works if I add this to the model.
    default_scope { order("first_name") }
  • l

    lemon-wall-20836

    01/16/2022, 12:12 PM
    you can use "Custom query scopes" https://docs.avohq.io/1.0/customization.html#custom-query-scopes
  • c

    clean-salesmen-51708

    01/16/2022, 12:12 PM
    But I'd rather not use default scopes
  • l

    lemon-wall-20836

    01/16/2022, 12:12 PM
    that's until we add custom views
  • l

    lemon-wall-20836

    01/16/2022, 12:13 PM
    it's like default_scope, but it's not
  • l

    lemon-wall-20836

    01/16/2022, 12:13 PM
    🙂
  • l

    lemon-wall-20836

    01/16/2022, 12:13 PM
    it's like applying a scope on the index view for Avo
  • l

    lemon-wall-20836

    01/16/2022, 12:13 PM
    not for the rest of the app
  • c

    clean-salesmen-51708

    01/16/2022, 12:13 PM
    Ah thanks
1...202122...64Latest