Skip to content
Snippets Groups Projects
Unverified Commit d4c88352 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

blobs exportable to git

parent 7e86d2c3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment