Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.28 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.28 KB

Trestle ActiveStorage Integration (trestle-active_storage)

ActiveStorage integration plugin for the Trestle admin framework

Gem

Usage

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

Installation

These instructions assume you have a working Trestle application. To integrate trestle-active_storage, first add it to your application's Gemfile:

gem 'trestle-active_storage'

Run bundle install, and then restart your Rails server.

TODO / Wishlist

License

The gem is available as open source under the terms of the MIT License.