Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
8d4c0093
Unverified
Commit
8d4c0093
authored
11 months ago
by
Sébastien Gaya
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
menu never saved/touch in auto-gen, so no need anymore (#1873)
parent
93233bcf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/communication/website/menu/with_automatism.rb
+3
-18
3 additions, 18 deletions
app/models/communication/website/menu/with_automatism.rb
with
3 additions
and
18 deletions
app/models/communication/website/menu/with_automatism.rb
+
3
−
18
View file @
8d4c0093
...
...
@@ -6,14 +6,9 @@ module Communication::Website::Menu::WithAutomatism
end
def
generate_automatically
begin
pause_git_sync
transaction
do
clear_items
create_items
end
ensure
unpause_git_sync
transaction
do
clear_items
create_items
end
end
...
...
@@ -23,11 +18,6 @@ module Communication::Website::Menu::WithAutomatism
protected
def
pause_git_sync
Communication
::
Website
::
Menu
.
skip_callback
:save
,
:after
,
:connect_dependencies
Communication
::
Website
::
Menu
.
skip_callback
:touch
,
:after
,
:connect_dependencies
end
def
clear_items
# We don't use the destroy method to prevent items' callbacks
items
.
delete_all
...
...
@@ -55,9 +45,4 @@ module Communication::Website::Menu::WithAutomatism
parent:
parent_item
create_items_for_children_of
(
page
,
item
)
end
def
unpause_git_sync
Communication
::
Website
::
Menu
.
set_callback
:save
,
:after
,
:connect_dependencies
Communication
::
Website
::
Menu
.
set_callback
:touch
,
:after
,
:connect_dependencies
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment