{"id":21519368,"url":"https://github.com/alexwayfer/flame-pagination","last_synced_at":"2025-03-17T16:49:50.534Z","repository":{"id":39657663,"uuid":"278469145","full_name":"AlexWayfer/flame-pagination","owner":"AlexWayfer","description":"Pagination for Flame application with Formalism forms.","archived":false,"fork":false,"pushed_at":"2024-04-23T18:00:26.000Z","size":65,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-23T20:08:42.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexWayfer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-09T20:56:05.000Z","updated_at":"2022-01-01T14:00:13.000Z","dependencies_parsed_at":"2024-04-23T19:26:50.764Z","dependency_job_id":"d2b06405-6df5-4f83-8f8c-07f9e8314bad","html_url":"https://github.com/AlexWayfer/flame-pagination","commit_stats":{"total_commits":76,"total_committers":2,"mean_commits":38.0,"dds":0.4078947368421053,"last_synced_commit":"34718479db53b82e524c7c72fa1ed00ac84da429"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexWayfer","download_url":"https://codeload.github.com/AlexWayfer/flame-pagination/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244074436,"owners_count":20393965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T00:57:35.150Z","updated_at":"2025-03-17T16:49:50.498Z","avatar_url":"https://github.com/AlexWayfer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flame Pagination\n\n[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/flame-pagination?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/flame-pagination)\n[![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/flame-pagination/main.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/flame-pagination)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/flame-pagination.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/flame-pagination)\n[![Depfu](https://img.shields.io/depfu/AlexWayfer/benchmark_toys?style=flat-square)](https://depfu.com/repos/github/AlexWayfer/flame-pagination)\n[![Inline docs](https://inch-ci.org/github/AlexWayfer/flame-pagination.svg?branch=main)](https://inch-ci.org/github/AlexWayfer/flame-pagination)\n[![license](https://img.shields.io/github/license/AlexWayfer/flame-pagination.svg?style=flat-square)](https://github.com/AlexWayfer/flame-pagination/blob/main/LICENSE.txt)\n[![Gem](https://img.shields.io/gem/v/flame-pagination.svg?style=flat-square)](https://rubygems.org/gems/flame-pagination)\n\nPagination for Flame application with Formalism forms.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'flame-pagination'\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nOr install it yourself as:\n\n```shell\ngem install flame-pagination\n```\n\n## Usage\n\nRecommended to use only as dependency of\n[`formalism-model_forms`](https://github.com/AlexWayfer/formalism-model_forms).\n\nYou'll still have to include `Flame::Pagination::ForController` into your model controller.\n\nDetails below:\n\n```ruby\nrequire 'flame-pagination'\n\nmodule MyProject\n  ## Already in `formalism-model_forms`\n  module Forms\n    module Model\n      ## Base form for model listing\n      class List \u003c Base\n        include Flame::Pagination::ForForms\n      end\n    end\n\n    module User\n      class List \u003c Model::List\n      end\n    end\n  end\n\n  ## Have to be set manually, maybe in some common `ModelController`\n  module Controlelrs\n    module UsersController\n      extend Flame::Controller::Actions\n      include Flame::Pagination::ForController\n\n      def index\n        @form = Forms::User::List.new(params[:user])\n\n        paginate! @form\n\n        @users = if (form_outcome = @form.run).success?\n          form_outcome.result\n        end\n\n        view :index\n      end\n    end\n  end\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies.\n\nThen, run `toys rspec` to run the tests.\n\nTo install this gem onto your local machine, run `toys gem install`.\n\nTo release a new version, run `toys gem release %version%`.\nSee how it works [here](https://github.com/AlexWayfer/gem_toys#release).\n\n## Contributing\n\nBug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/flame-pagination).\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fflame-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexwayfer%2Fflame-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fflame-pagination/lists"}