From 994be826b4107ab942f4243a716874faa530399c Mon Sep 17 00:00:00 2001 From: Ben Koshy Date: Tue, 12 Nov 2024 09:57:51 +1100 Subject: [PATCH] add: readme + credits --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7db80e4..7955ecf 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,54 @@ -# README +### What is this? -This README would normally document whatever steps are necessary to get the -application up and running. +* Rails demo app +* Re: how to set up [pagy](https://github.com/ddnexus/pagy). +* Can be used to reproduce bugs. -Things you may want to cover: +Please check out other [pagy demo apps](https://github.com/stars/benkoshy/lists/rails-demo-apps-for-pagy) if you want to see samples of how other functionality can be set up. -* Ruby version +* Rails: 8.0.0 +* Ruby: +3.2.0 +* Importmaps +* Propshaft -* System dependencies +### Set up Instructions -* Configuration +### Choose your branch -* Database creation +* `master` - for offset pagination. +* `keyset` - for keyset pagination. +* `offset` - for offset based pagination. -* Database initialization +Check out the commit history, depending on the branch you choose. -* How to run the test suite +```sh +rake db:migrate db:seed +``` + +The following sets up the database, and "seeds" it - i.e. filling it with 1000s records. + + +```sh +./bin/dev +# starts the rails server +``` + +Point your browser to: [http://[::1]:3000](http://[::1]:3000) and you should see pagy functioning. + +### License + +MIT + +### Contributing + +* If I've made a mistake please feel free to raise an issue. + +* PRs fixing bugs or updating gems etc will be welcomed! + + +### Infinite Pagination via Keyset + +Credit: https://youtu.be/bVvLNpJyZuw -* Services (job queues, cache servers, search engines, etc.) -* Deployment instructions -* ...