@@ -5,13 +5,12 @@ def clone(convention)
55 clone_pages ( convention )
66 clone_cms_navigation_items ( convention )
77 clone_cms_files ( convention )
8- clone_cms_content_group_contents ( convention )
8+ clone_cms_content_group_contents
99 clone_notification_templates ( convention )
1010
1111 convention . update! (
1212 root_page : @id_maps [ :pages ] [ source_convention . root_page_id ] ,
13- default_layout : @id_maps [ :cms_layouts ] [ source_convention . default_layout_id ] ,
14- user_con_profile_form : @id_maps [ :forms ] [ source_convention . user_con_profile_form_id ]
13+ default_layout : @id_maps [ :cms_layouts ] [ source_convention . default_layout_id ]
1514 )
1615 end
1716
@@ -60,10 +59,10 @@ def clone_cms_files(convention)
6059 end
6160 end
6261
63- def clone_cms_content_group_contents ( convention )
62+ def clone_cms_content_group_contents
6463 Rails . logger . info ( "Cloning CMS content group contents" )
6564
66- convention . cms_content_groups . find_each do |cms_content_group |
65+ source_convention . cms_content_groups . find_each do |cms_content_group |
6766 cloned_cms_content_group = @id_maps . fetch ( :cms_content_groups ) . fetch ( cms_content_group . id )
6867
6968 %i[ pages cms_partials cms_layouts ] . each do |content_type |
@@ -87,6 +86,7 @@ def clone_notification_templates(convention)
8786
8887 cloned_notification_template . notification_destinations . destroy_all
8988 destination_id_map = clone_notification_destinations ( notification_template , cloned_notification_template )
89+ @id_maps [ :notification_destinations ] = { }
9090 @id_maps [ :notification_destinations ] . merge! ( destination_id_map )
9191 end
9292 end
0 commit comments