'Rails Active Storage and Acts as List
I've been working on a way to add acts_as_list to ActiveStorage::Attachment using a concern. I've been working on this for two days and can't seem to find a way to add the line acts_as_list to the model. I tried to load with an initializer. Any thoughts?
Here's the initializer code:
Rails.configuration.to_prepare do
class ActiveStorage::Attachment
include ActiveStorageActsAsList
end
end
Concern
module ActiveStorageActsAsList
extend ActiveSupport::Concern
included do
acts_as_list
end
end
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
