Skip to content
Snippets Groups Projects
Unverified Commit 8c7ea547 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

current permalink

parent 19c60256
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,12 @@ module WithPermalink
dependent: :destroy
end
def current_permalink_in_website(website)
permalinks.for_website(website).current.first
end
def manage_permalink_in_website(website)
last_permalink = permalinks.for_website(website).current.first
current_permalink = current_permalink_in_website(website)
new_permalink = Communication::Website::Permalink.for_object(self, website)
# If the object had no permalink or if its path changed, we create a new permalink
......
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