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
21eb2ea9
Unverified
Commit
21eb2ea9
authored
2 years ago
by
Sébastien Gaya
Browse files
Options
Downloads
Patches
Plain Diff
#338
parent
509c6174
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models/communication/block.rb
+2
-2
2 additions, 2 deletions
app/models/communication/block.rb
app/models/concerns/with_blocks.rb
+1
-1
1 addition, 1 deletion
app/models/concerns/with_blocks.rb
with
3 additions
and
3 deletions
app/models/communication/block.rb
+
2
−
2
View file @
21eb2ea9
...
...
@@ -44,7 +44,7 @@ class Communication::Block < ApplicationRecord
}
before_save
:update_template_images
after_
update_
commit
:save_and_sync_about
after_commit
:save_and_sync_about
,
on:
[
:update
,
:destroy
]
def
data
=
(
value
)
value
=
JSON
.
parse
value
if
value
.
is_a?
String
...
...
@@ -71,7 +71,7 @@ class Communication::Block < ApplicationRecord
protected
def
save_and_sync_about
about
.
save_and_sync
about
&
.
save_and_sync
unless
about
&
.
destroyed?
end
def
update_template_images
...
...
This diff is collapsed.
Click to expand it.
app/models/concerns/with_blocks.rb
+
1
−
1
View file @
21eb2ea9
...
...
@@ -2,7 +2,7 @@ module WithBlocks
extend
ActiveSupport
::
Concern
included
do
has_many
:blocks
,
as: :about
,
class_name:
'Communication::Block'
has_many
:blocks
,
as: :about
,
class_name:
'Communication::Block'
,
dependent: :destroy
end
def
git_block_dependencies
...
...
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