Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/admin/communication/blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions app/models/communication/website/git_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion app/models/communication/website/menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Comment thread
arnaudlevy marked this conversation as resolved.
website.id == communication_website_id &&
website.active_language_ids.include?(language_id) &&
items.any?
end

def template_static
Expand Down
4 changes: 2 additions & 2 deletions app/models/concerns/has_git_files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading