Home>

Same as the title
Is to get all 10,10,11,12,13,14,15,16,17,18,19,20th records

  • Answer # 1

    How about this? It is assumed that the target model has acreated_atcolumn.

    # Please change the `Model` part to the model name you want to get
    Model.order (created_at:: desc) .limit (10) .offset (10) .reverse