diff --git a/app/controllers/admin/communication/blocks_controller.rb b/app/controllers/admin/communication/blocks_controller.rb index 5c98685ca..a398ccd7d 100644 --- a/app/controllers/admin/communication/blocks_controller.rb +++ b/app/controllers/admin/communication/blocks_controller.rb @@ -13,7 +13,7 @@ def reorder block.update_column(:position, index + 1) about ||= block.about # Always the same about, doesn't matter end - about.try(:mark_git_files_for_update!) + about.try(:analyze_git_files!) end def new diff --git a/app/models/communication/website/git_file.rb b/app/models/communication/website/git_file.rb index 441f88983..9a7650bcc 100644 --- a/app/models/communication/website/git_file.rb +++ b/app/models/communication/website/git_file.rb @@ -80,13 +80,6 @@ def analyze! end end - def mark_for_update! - update( - desynchronized: true, - desynchronized_at: Time.zone.now - ) - end - def mark_for_destruction! return if current_path.nil? && current_sha.nil? now = Time.zone.now diff --git a/app/models/communication/website/menu.rb b/app/models/communication/website/menu.rb index 62c62a680..95a33f94a 100644 --- a/app/models/communication/website/menu.rb +++ b/app/models/communication/website/menu.rb @@ -61,7 +61,9 @@ def git_path(website) end def should_sync_to?(website) - website.id == communication_website_id && website.active_language_ids.include?(language_id) && items.any? + website.id == communication_website_id && + website.active_language_ids.include?(language_id) && + items.any? end def template_static diff --git a/app/models/concerns/has_git_files.rb b/app/models/concerns/has_git_files.rb index 2ecdf8f6a..633fd9f02 100644 --- a/app/models/concerns/has_git_files.rb +++ b/app/models/concerns/has_git_files.rb @@ -30,8 +30,8 @@ def git_path_content_prefix(website) path end - def mark_git_files_for_update! - git_files.each &:mark_for_update! + def analyze_git_files! + git_files.each &:analyze! end end