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

app:fix

parent ce6379e0
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,18 @@ namespace :app do
desc 'Fix things'
task fix: :environment do
Communication::Website.find_each do |website|
# Rebuild connections
website.pages.find_each(&:connect_dependencies)
website.posts.find_each(&:connect_dependencies)
website.categories.find_each(&:connect_dependencies)
website.menus.find_each(&:connect_dependencies)
website.connect(website.about, website) if website.about.present?
website.destroy_obsolete_connections
website.sync_with_git
website.destroy_obsolete_git_files
end
end
namespace :websites do
......
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