mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Install Active Storage extension lazily
Avoid eagerly loading Active Record during app boot. Reinstall the extension when ActiveStorage::Blob is reloaded in dev.
This commit is contained in:
parent
3b6b70f0bc
commit
1a4a582ddc
1 changed files with 1 additions and 3 deletions
|
@ -12,9 +12,7 @@ module ActionText
|
|||
end
|
||||
|
||||
initializer "action_text.active_storage_extension" do
|
||||
require "active_storage/blob"
|
||||
|
||||
class ActiveStorage::Blob
|
||||
ActiveSupport.on_load(:active_storage_blob) do
|
||||
include ActionText::Attachable
|
||||
|
||||
def previewable_attachable?
|
||||
|
|
Loading…
Reference in a new issue