Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
251a20a3
Commit
251a20a3
authored
Nov 03, 2016
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split out markdown cache storage into a separate method
parent
3a8a7c12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib/banzai/renderer.rb
lib/banzai/renderer.rb
+5
-1
No files found.
lib/banzai/renderer.rb
View file @
251a20a3
...
@@ -46,7 +46,7 @@ module Banzai
...
@@ -46,7 +46,7 @@ module Banzai
return
html
if
html
.
present?
return
html
if
html
.
present?
html
=
cacheless_render_field
(
object
,
field
)
html
=
cacheless_render_field
(
object
,
field
)
object
.
update_column
(
html_field
,
html
)
unless
object
.
new_record?
||
object
.
destroyed?
update_object
(
object
,
html_field
,
html
)
unless
object
.
new_record?
||
object
.
destroyed?
html
html
end
end
...
@@ -166,5 +166,9 @@ module Banzai
...
@@ -166,5 +166,9 @@ module Banzai
return
unless
cache_key
return
unless
cache_key
Rails
.
cache
.
send
(
:expanded_key
,
full_cache_key
(
cache_key
,
pipeline_name
))
Rails
.
cache
.
send
(
:expanded_key
,
full_cache_key
(
cache_key
,
pipeline_name
))
end
end
def
update_object
(
object
,
html_field
,
html
)
object
.
update_column
(
html_field
,
html
)
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment