mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-22 14:21:49 +00:00
fix: sugerir la url actual como valor por defecto
This commit is contained in:
parent
b7b435efc4
commit
103daa356b
1 changed files with 11 additions and 0 deletions
|
@ -7,6 +7,17 @@ class MetadataPermalink < MetadataString
|
|||
false
|
||||
end
|
||||
|
||||
# Devuelve la URL actual del sitio
|
||||
#
|
||||
# @return [String, nil]
|
||||
def default_value
|
||||
if post.written?
|
||||
super.presence || document.url
|
||||
else
|
||||
super.presence
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Al hacer limpieza, validamos la ruta. Eliminamos / multiplicadas,
|
||||
|
|
Loading…
Reference in a new issue