Skip to content
Snippets Groups Projects
Unverified Commit a65e8d6b authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

Merge pull request #670 from noesya/fix/permalink-memoization

Fix memoization computed_path permalink
parents c742b658 8d476c9b
No related branches found
No related tags found
No related merge requests found
......@@ -82,8 +82,8 @@ class Communication::Website::Permalink < ApplicationRecord
end
def computed_path
return nil unless published?
@computed_path ||= Static.clean_path(published_path)
return @computed_path if defined?(@computed_path)
@computed_path ||= published? ? Static.clean_path(published_path) : nil
end
def save_if_needed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment