Skip to content

Commit

Permalink
Add 4.6 todo notes
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed May 27, 2020
1 parent 43973c5 commit b120ed7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
17 changes: 17 additions & 0 deletions lib/alchemy/upgrader/four_point_six.rb
Expand Up @@ -3,6 +3,23 @@
module Alchemy
class Upgrader::FourPointSix < Upgrader
class << self
def todos
notice = <<-NOTE.strip_heredoc
ℹ️ Page visible attribute is deprecated
----------------------------------------
Page slugs will be visible in URLs of child pages all the time in the future.
Please use Menus and Tags instead to re-organize your pages if your page tree does not reflect the URL hierarchy.
A rake task to help with the migration is available.
bin/rake alchemy:upgrade:4.6:restructure_page_tree
NOTE
todo notice, "Alchemy v4.6 TODO"
end

def restructure_page_tree
desc "Move child pages of invisible pages to visible parent."
pages = Alchemy::Page.contentpages.where(visible: [false, nil]).order(depth: :desc)
Expand Down
6 changes: 5 additions & 1 deletion lib/tasks/alchemy/upgrade.rake
Expand Up @@ -8,7 +8,7 @@ namespace :alchemy do
"alchemy:upgrade:4.1:run", "alchemy:upgrade:4.1:todo",
"alchemy:upgrade:4.2:run", "alchemy:upgrade:4.2:todo",
"alchemy:upgrade:4.4:run", "alchemy:upgrade:4.4:todo",
"alchemy:upgrade:4.6:run",
"alchemy:upgrade:4.6:run", "alchemy:upgrade:4.6:todo",
] do
Alchemy::Upgrader.display_todos
end
Expand Down Expand Up @@ -150,6 +150,10 @@ namespace :alchemy do
task restructure_page_tree: [:environment] do
Alchemy::Upgrader::FourPointSix.restructure_page_tree
end

task :todo do
Alchemy::Upgrader::FourPointSix.todos
end
end
end
end

0 comments on commit b120ed7

Please sign in to comment.