diff --git a/app/models/communication/website/git_file.rb b/app/models/communication/website/git_file.rb index b4352b3dcd52d62179ee1934e678f6a4b284c6f7..48b81f6f075beb0ba389e1a849f53e7b697a1a03 100644 --- a/app/models/communication/website/git_file.rb +++ b/app/models/communication/website/git_file.rb @@ -36,6 +36,7 @@ class Communication::Website::GitFile < ApplicationRecord # Some objects need to declare that property: # - the website itself # - configs (which inherit from the website) + # - active storage blobs return unless object.try(:exportable_to_git?) # Permalinks must be calculated BEFORE renders manage_permalink object, website diff --git a/config/initializers/active_storage.rb b/config/initializers/active_storage.rb index 09189629127c9671cab691d6adf82dec7628e749..111aff7e39b8b3c3216a4f2e143bfdcdae11411f 100644 --- a/config/initializers/active_storage.rb +++ b/config/initializers/active_storage.rb @@ -46,6 +46,10 @@ Rails.application.config.to_prepare do def git_path(website) "data/media/#{id[0..1]}/#{id}.yml" end + + def exportable_to_git? + true + end end ActiveStorage::Blob.include ActiveStorageGitPathStatic