{"id":19710458,"url":"https://github.com/rootstrap/activeadmin-async_exporter","last_synced_at":"2025-04-29T17:31:16.347Z","repository":{"id":62552732,"uuid":"213988535","full_name":"rootstrap/activeadmin-async_exporter","owner":"rootstrap","description":"Async exporter for Active Admin using ActiveJob","archived":false,"fork":false,"pushed_at":"2020-10-19T15:41:27.000Z","size":94,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-19T06:38:01.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rootstrap.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootstrap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-09T18:02:20.000Z","updated_at":"2024-09-06T17:51:16.000Z","dependencies_parsed_at":"2022-11-03T04:15:25.654Z","dependency_job_id":null,"html_url":"https://github.com/rootstrap/activeadmin-async_exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Factiveadmin-async_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Factiveadmin-async_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Factiveadmin-async_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Factiveadmin-async_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootstrap","download_url":"https://codeload.github.com/rootstrap/activeadmin-async_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251549192,"owners_count":21607367,"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-11T22:07:25.781Z","updated_at":"2025-04-29T17:31:15.762Z","avatar_url":"https://github.com/rootstrap.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/rootstrap/activeadmin-async_exporter.svg?branch=master)](https://travis-ci.org/rootstrap/activeadmin-async_exporter)\n[![Maintainability](https://api.codeclimate.com/v1/badges/c0bcdb8b4c29dbaa4072/maintainability)](https://codeclimate.com/github/rootstrap/activeadmin-async_exporter/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/c0bcdb8b4c29dbaa4072/test_coverage)](https://codeclimate.com/github/rootstrap/activeadmin-async_exporter/test_coverage)\n\n# ActiveAdmin::AsyncExporter\n\nAsync exporter for Active Admin using ActiveJob.\n\n## Installation\nAll you have to do is add the gem to your project like this:\n```bash\n$ gem 'activeadmin-async_exporter'\n```\n\n## Usage\nIn order to use the gem, simply go to the admin file of the model you want to generate CSV reports of and add the `csv_async` helper.\nFor example, let's use `User` as our model\n```ruby\n# User\n## email\n## first_name\n## last_name\n## created_at\n\nActiveAdmin.register User do\n  csv_async do\n    csv_colmun(:email)\n    csv_column(:created_at)\n  end\nend\n```\nIf you want to change the column header name, you can do so by adding another parameter, for example:\n```ruby\nActiveAdmin.register User do\n  csv_async do\n    csv_colmun(:email)\n    csv_column(:date_joined, :created_at)\n  end\nend\n```\nthis will let the gem know that the column header name has to be `date_joined` and use the `created_at` value for it.\n\n\nNow, let's say we need to add some logic to the data added to the CSV, for example, instead of having `first_name` and `last_name` as separate columns, we can have just one `full_name` column, to achieve this, we encourage you to use decorators. Let's see an example using Draper:\n```ruby\nclass UserDecorator \u003c Draper::Decorator\n  delegate_all\n\n  def full_name\n    \"#{first_name} #{last_name}\"\n  end\nend\n\nActiveAdmin.register User do\n  decorate_with UserDecorator\n\n  csv_async do\n    csv_colmun(:email)\n    csv_column(:full_name)\n    csv_column(:date_joined, :created_at)\n  end\nend\n```\n\n\n## Contributing\nBug reports (please use Issues) and pull requests are welcome on GitHub at https://github.com/rootstrap/activeadmin-async_exporter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Credits\n**ActiveAdmin::AsyncExporter** is maintained by [Rootstrap](http://www.rootstrap.com) with the help of our [contributors](https://github.com/rootstrap/activeadmin-async_exporter/contributors).\n\n[\u003cimg src=\"https://s3-us-west-1.amazonaws.com/rootstrap.com/img/rs.png\" width=\"100\"/\u003e](http://www.rootstrap.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Factiveadmin-async_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootstrap%2Factiveadmin-async_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Factiveadmin-async_exporter/lists"}