{"id":13879062,"url":"https://github.com/richardvenneman/trestle-active_storage","last_synced_at":"2025-04-07T18:13:18.357Z","repository":{"id":25458132,"uuid":"103646672","full_name":"richardvenneman/trestle-active_storage","owner":"richardvenneman","description":"⛩ ActiveStorage integration plugin for the Trestle admin framework","archived":false,"fork":false,"pushed_at":"2024-02-07T15:55:41.000Z","size":143,"stargazers_count":29,"open_issues_count":19,"forks_count":42,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T15:18:45.383Z","etag":null,"topics":["rails","ruby","trestle"],"latest_commit_sha":null,"homepage":"","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/richardvenneman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","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}},"created_at":"2017-09-15T10:49:04.000Z","updated_at":"2024-04-06T08:27:02.000Z","dependencies_parsed_at":"2024-01-13T20:56:34.613Z","dependency_job_id":"79eb13c6-d289-4b55-9a04-af1d519868f8","html_url":"https://github.com/richardvenneman/trestle-active_storage","commit_stats":{"total_commits":137,"total_committers":11,"mean_commits":"12.454545454545455","dds":"0.43065693430656937","last_synced_commit":"5a9c90e3d71c8cf6b40444292d7e77f3137c589b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-active_storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-active_storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-active_storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-active_storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardvenneman","download_url":"https://codeload.github.com/richardvenneman/trestle-active_storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704571,"owners_count":20982298,"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":["rails","ruby","trestle"],"created_at":"2024-08-06T08:02:08.548Z","updated_at":"2025-04-07T18:13:18.320Z","avatar_url":"https://github.com/richardvenneman.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Trestle Active Storage Integration (trestle-active_storage)\n\n\u003e [Active Storage](https://guides.rubyonrails.org/active_storage_overview.html) integration plugin for the [Trestle admin framework](https://trestle.io)\n\n[![Gem](https://img.shields.io/gem/v/trestle-active_storage.svg)](https://rubygems.org/gems/trestle-active_storage)\n\n## Usage\n\nDefine the active storage fields in your Trestle resource and use the `active_storage_field` field type:\n\n```ruby\nTrestle.resource(:users) do\n  active_storage_fields do\n    [:avatar, :profile_picture]\n  end\n\n  form do |user|\n    text_field :first_name\n    text_field :last_name\n    active_storage_field :avatar\n    active_storage_field :profile_picture\n  end\nend\n```\n\nYou can use the `active_storage_field` field type for both `has_one_attached` and `has_many_attached` attachments.\n\n## Installation\n\nThese instructions assume you have a working Trestle application. To integrate trestle-active_storage, first add it to your application's Gemfile:\n\n```ruby\ngem 'trestle-active_storage'\n```\n\nRun `bundle install`, and then restart your Rails server.\n\n### Active Storage previews\n\nThis plugin shows previews of uploaded files if your system meets the requirements. For more information please [consult the Ruby on Rails guides](https://edgeguides.rubyonrails.org/active_storage_overview.html#previewing-files).\n\nIf you'd like to get up and running on Heroku, check out their [documentation on Active Storage on Heroku](https://devcenter.heroku.com/articles/active-storage-on-heroku#attachment-previews). The [Ruby on Rails Development Dependencies Install guide](https://edgeguides.rubyonrails.org/development_dependencies_install.html#active-storage-setup) outlines how to install the neccessary dependencies to get previews working locally.\n\n## TODO / Wishlist\n\n- [x] Support for `has_many_attached` attachments\n- [x] Support for Active Storage previews\n- [ ] Preview of selected local file ([#1](https://github.com/richardvenneman/trestle-active_storage/issues/1))\n- [ ] Integration tests\n\n## Contributors\n\nThanks goes out to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.cityspotters.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/75705?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRichard Venneman\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-richardvenneman\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/commits?author=richardvenneman\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/commits?author=richardvenneman\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#question-richardvenneman\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/pulls?q=is%3Apr+reviewed-by%3Arichardvenneman\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://aboobacker.in\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/3112976?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAboobacker MK\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-tachyons\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://euodeiovoce.com.br\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/1027961?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRafael Porto\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/commits?author=PunkMaldito\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/hoenth\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/62977?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTom Hoen\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/issues?q=author%3Ahoenth\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/commits?author=hoenth\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/basharabdullah\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/167290?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBashar Abdullah\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/issues?q=author%3Abasharabdullah\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/McRipper\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/58031?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEmanuele Barban\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/commits?author=McRipper\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/oleg-kiviljov\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/10065250?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eOleg Kiviljov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/issues?q=author%3Aoleg-kiviljov\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/richardvenneman/trestle-active_storage/commits?author=oleg-kiviljov\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardvenneman%2Ftrestle-active_storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardvenneman%2Ftrestle-active_storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardvenneman%2Ftrestle-active_storage/lists"}