Trestle Active Storage Integration (trestle-active_storage)
Define the active storage fields in your Trestle resource and use the
active_storage_field field type:
Trestle.resource(:users) do active_storage_fields do [:avatar, :profile_picture] end form do |user| text_field :first_name text_field :last_name active_storage_field :avatar active_storage_field :profile_picture end end
You can use the
active_storage_field field type for both
These instructions assume you have a working Trestle application. To integrate trestle-active_storage, first add it to your application's Gemfile:
bundle install, and then restart your Rails server.
Active Storage previews
This plugin shows previews of uploaded files if your system meets the requirements. For more information please consult the Ruby on Rails guides.
If you'd like to get up and running on Heroku, check out their documentation on Active Storage on Heroku. The Ruby on Rails Development Dependencies Install guide outlines how to install the neccessary dependencies to get previews working locally.
TODO / Wishlist
- Support for
- Support for Active Storage previews
- Preview of selected local file (#1)
- Integration tests
This project follows the all-contributors specification.
The gem is available as open source under the terms of the MIT License.